2014-06-12 12:43:21 +02:00
|
|
|
include $(MENUETDEV)/osrules.mak
|
|
|
|
|
|
|
|
.SUFFIXES: .asm;
|
|
|
|
|
2014-10-08 18:14:52 +02:00
|
|
|
AS = kos32-as
|
2014-06-12 12:43:21 +02:00
|
|
|
NASM = nasm
|
2014-10-08 18:14:52 +02:00
|
|
|
CPP = kos32-cpp
|
2014-06-12 12:43:21 +02:00
|
|
|
|
|
|
|
DEBUG = 0
|
|
|
|
|
|
|
|
.c.o:
|
2014-10-08 18:14:52 +02:00
|
|
|
$(MGCC) $*.c -o $*.o $(CFLAGS)
|
2014-06-12 12:43:21 +02:00
|
|
|
|
|
|
|
.cpp.o:
|
2014-10-08 18:14:52 +02:00
|
|
|
$(MGPP) $*.cpp -o $*.o $(CPPFLAGS)
|
2014-06-12 12:43:21 +02:00
|
|
|
|
|
|
|
.asm.o:
|
|
|
|
$(NASM) $*.asm -o $*.o -f $(ASMFMT)
|
|
|
|
|
|
|
|
.s.o:
|
|
|
|
$(CPP) -nostdinc -I$(MENUETDEV)/include $*.s -o $*.sx $(CSFLAGS) -DMENUETDEV=$(MENUETDEV) -D__DEV_CONFIG_H=\"$(MENUETDEV)/config.h\"
|
2014-10-08 18:14:52 +02:00
|
|
|
$(AS) $*.sx -o $*.o
|
2014-06-12 12:43:21 +02:00
|
|
|
$(RM) $*.sx
|
|
|
|
|
|
|
|
ATHIS_LIBC_OBJS += $(subst .c,.o,$(filter %.c,$(THIS_SRCS))) \
|
|
|
|
$(subst .s,.o,$(filter %.s,$(THIS_SRCS))) \
|
|
|
|
$(subst .cpp,.o,$(filter %.cpp,$(THIS_SRCS)))
|
|
|
|
|
|
|
|
THIS_LIBC_OBJS = $(addprefix $(CURDIR)/,$(ATHIS_LIBC_OBJS))
|
|
|
|
|
|
|
|
export MENUET_LIBC_OBJS += $(THIS_LIBC_OBJS)
|
|
|
|
|
|
|
|
all: making check_ldepend $(ATHIS_LIBC_OBJS)
|
|
|
|
@$(MENUET_LIBC_TOPDIR)/m_echo $(MENUET_LIBC_TOPDIR)/tmp_make $(THIS_LIBC_OBJS)
|
|
|
|
|
|
|
|
making:
|
|
|
|
@echo --- Making in $(CURDIR) ---
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(ATHIS_LIBC_OBJS)
|
|
|
|
ifdef ON_MINGW
|
|
|
|
@echo # nothing> ./ldepend
|
|
|
|
else
|
|
|
|
@echo "# nothing" > ./ldepend
|
|
|
|
endif
|
|
|
|
|
|
|
|
depend:
|
|
|
|
$(MMKDEP) $(THIS_SRCS) > ./ldepend
|
|
|
|
|
|
|
|
ifeq ($(wildcard ./ldepend),)
|
|
|
|
check_ldepend:
|
|
|
|
echo Warning: ldepend not present in $(CURDIR)
|
|
|
|
else
|
|
|
|
check_ldepend:
|
|
|
|
|
|
|
|
include ldepend
|
|
|
|
endif
|