Subversion Repositories Kolibri OS

Rev

Rev 4764 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1882 clevermous 1
include $(MENUETDEV)/osrules.mak
2
 
3
.SUFFIXES: .asm;
4
 
4765 right-hear 5
 
1882 clevermous 6
NASM = nasm
7
 
8
DEBUG = 0
9
 
10
.c.o:
11
	$(MGCC) $*.c $*.o $(CFLAGS) $(GCC32OPT)
12
 
13
.cpp.o:
14
	$(MGPP) $*.cpp $*.o $(CPPFLAGS) $(GCC32OPT)
15
 
16
.asm.o:
17
	$(NASM) $*.asm -o $*.o -f $(ASMFMT)
18
 
19
.s.o:
4763 right-hear 20
	$(CPP) -nostdinc -I$(MENUETDEV)/include $*.s -o $*.sx $(CSFLAGS) -DMENUETDEV=$(MENUETDEV) -D__DEV_CONFIG_H=\"$(MENUETDEV)/config.h\"
4764 right-hear 21
	$(AS) $*.sx $(AS32OPT) -o $*.o
1882 clevermous 22
	$(RM) $*.sx
23
 
24
ATHIS_LIBC_OBJS += $(subst .c,.o,$(filter %.c,$(THIS_SRCS))) \
25
	$(subst .s,.o,$(filter %.s,$(THIS_SRCS))) \
26
	$(subst .cpp,.o,$(filter %.cpp,$(THIS_SRCS)))
27
 
28
THIS_LIBC_OBJS = $(addprefix $(CURDIR)/,$(ATHIS_LIBC_OBJS))
29
 
30
export MENUET_LIBC_OBJS += $(THIS_LIBC_OBJS)
31
 
32
all: making check_ldepend $(ATHIS_LIBC_OBJS)
33
	@$(MENUET_LIBC_TOPDIR)/m_echo $(MENUET_LIBC_TOPDIR)/tmp_make $(THIS_LIBC_OBJS)
34
 
35
making:
36
	@echo --- Making in $(CURDIR) ---
37
 
38
clean:
39
	$(RM) $(ATHIS_LIBC_OBJS)
40
ifdef ON_MINGW
41
	@echo # nothing> ./ldepend
42
else
43
	@echo "# nothing" > ./ldepend
44
endif
45
 
46
ifdef DJDIR
47
depend:
48
	echo $(THIS_SRCS) > __tmp.1
49
	$(MMKDEP) @__tmp.1 > ./ldepend
50
	$(RM) __tmp.1
51
else
52
depend:
53
	$(MMKDEP) $(THIS_SRCS) > ./ldepend
54
endif
55
 
56
ifeq ($(wildcard ./ldepend),)
57
check_ldepend:
58
	echo Warning: ldepend not present in $(CURDIR)
59
else
60
check_ldepend:
61
 
62
include ldepend
63
endif