Rev 1056 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
558 | giacomo | 1 | include $(BASE)/../shark.cfg |
2 | |||
3 | CC = gcc |
||
4 | AS = gcc |
||
5 | LD = ld |
||
6 | AR = ar |
||
7 | INCL = $(BASE) |
||
8 | LIB_PATH = $(BASE)/lib/ |
||
9 | LIB_DIR = $(BASE)/lib |
||
10 | |||
572 | giacomo | 11 | CFG_OPT += -D__LINUX__ |
12 | |||
558 | giacomo | 13 | ifeq ($(TSC),TRUE) |
14 | CFG_OPT += -D__TSC__ |
||
15 | ifeq ($(APIC),TRUE) |
||
16 | CFG_OPT += -D__APIC__ |
||
17 | endif |
||
18 | endif |
||
19 | |||
20 | ifeq ($(findstring 1000,$(TIMER_OPT)) , 1000) |
||
21 | CFG_OPT += -D__O1000__ |
||
22 | else |
||
23 | ifeq ($(findstring 2000,$(TIMER_OPT)) , 2000) |
||
24 | CFG_OPT += -D__O2000__ |
||
25 | else |
||
26 | ifeq ($(findstring 4000,$(TIMER_OPT)) , 4000) |
||
27 | CFG_OPT += -D__O4000__ |
||
28 | else |
||
29 | CFG_OPT += -D__O8000__ |
||
30 | endif |
||
31 | endif |
||
32 | endif |
||
33 | |||
34 | ifeq ($(findstring NEW,$(TRACER)) , NEW) |
||
598 | giacomo | 35 | ifeq ($(TSC),TRUE) |
558 | giacomo | 36 | CFG_OPT += -D__NEW_TRACER__ |
37 | endif |
||
598 | giacomo | 38 | endif |
558 | giacomo | 39 | ifeq ($(findstring OLD,$(TRACER)) , OLD) |
40 | CFG_OPT += -D__OLD_TRACER__ |
||
41 | endif |
||
42 | |||
1061 | tullio | 43 | # this options are for newer gcc4 compilers |
1056 | tullio | 44 | C_OPT = -Wall -O -fno-builtin -nostdinc -Wno-attributes -Wno-pointer-sign -minline-all-stringops $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL) |
1061 | tullio | 45 | # in case of problems with older gcc versions, please |
46 | # comment the previous line and uncomment the following line |
||
47 | # C_OPT = -Wall -O -fno-builtin -nostdinc -minline-all-stringops $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL) |
||
572 | giacomo | 48 | ASM_OPT = -x assembler-with-cpp $(CFG_OPT) -I$(INCL) |
558 | giacomo | 49 | LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) |
50 | |||
51 | MKDIR = mkdir |
||
52 | CP = cp |
||
53 | CAT = cat |
||
54 | RM = rm -f |
||
55 | RMDIR = rm -rf |
||
56 | |||
57 | # Common rules |
||
58 | |||
59 | %.o : %.s |
||
60 | $(REDIR) $(CC) $(ASM_OPT) -c $< |
||
61 | %.o : %.c |
||
62 | $(REDIR) $(CC) $(C_OPT) -c $< |
||
63 | %.s : %.c |
||
64 | $(REDIR) $(CC) $(C_OPT) -S $< |
||
65 |