Subversion Repositories Kolibri OS

Rev

Rev 4973 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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