root/Whitix/branches/acpi/make.inc

Revision 1210, 0.9 KB (checked in by mwhitworth, 4 years ago)

Remove out-of-date suffix rules, replace with pattern rules. Comment out CC echoes for now.

Line 
1#Define DEPTH before including this file
2
3.PHONY: clean
4.IGNORE: clean
5
6CC = gcc
7CPP = gpp
8ASM = nasm
9RM  = rm -f
10SED = sed
11override CFLAGS += -fomit-frame-pointer -ffreestanding -fno-stack-protector -fno-builtin \
12        -nostdlib -m32 -Wall -Wextra -Os -I$(DEPTH)include -Wno-unused-parameter
13BE_VERBOSE = 0
14LD_R_FLAGS = -r -melf_i386
15
16# Build the dependency list
17DEPS := $(MODULES:%.sys=.deps/%.d)
18DEPS += $(OBJS:%.o=.deps/%.d)
19
20%.o : %.c
21#       @echo "CC $*.c"
22        $(CC) $(CFLAGS) -c $*.c -o $*.o
23        @$(CC) -MM $(CFLAGS) -c $*.c > .deps/$*.d
24
25%.sys : %.c
26#       @echo "CC $*.c"
27        $(CC) $(CFLAGS) -DMODULE -fno-common -c $*.c -o $*.sys
28        @$(CC) -MM $(CFLAGS) -DMODULE -c $*.c > .deps/$*.d
29        $(SED) -i "s/$*.o/$*.sys/" .deps/$*.d
30
31#gas assembly files
32%.o : %.S
33        $(CC) -I$(DEPTH)include -ffreestanding -fleading-underscore -fno-builtin -m32 -c $*.S -o $*.o
34#       @echo "AS $*.S"
35
36ifneq ($(IGNORE_CLEAN), y)
37clean:
38        -rm -f *.o *.sys .deps/*.d
39endif
Note: See TracBrowser for help on using the browser.