Rev 588 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
311 | giacomo | 1 | include $(BASE)/../shark.cfg |
2 | |||
2 | pj | 3 | CC = gcc |
4 | AS = gcc |
||
5 | LD = ld |
||
6 | AR = ar |
||
7 | INCL = $(BASE) |
||
8 | LIB_PATH = $(BASE)/lib/ |
||
588 | giacomo | 9 | LIB_DIR = $(BASE)/lib |
2 | pj | 10 | |
588 | giacomo | 11 | CFG_OPT += -D__LINUX__ |
12 | |||
311 | giacomo | 13 | ifeq ($(TSC),TRUE) |
588 | giacomo | 14 | CFG_OPT += -D__TSC__ |
311 | giacomo | 15 | ifeq ($(APIC),TRUE) |
16 | CFG_OPT += -D__APIC__ |
||
17 | endif |
||
18 | endif |
||
19 | |||
332 | giacomo | 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 |
||
336 | giacomo | 29 | CFG_OPT += -D__O8000__ |
332 | giacomo | 30 | endif |
31 | endif |
||
32 | endif |
||
33 | |||
353 | giacomo | 34 | ifeq ($(findstring NEW,$(TRACER)) , NEW) |
598 | giacomo | 35 | ifeq ($(TSC),TRUE) |
353 | giacomo | 36 | CFG_OPT += -D__NEW_TRACER__ |
37 | endif |
||
598 | giacomo | 38 | endif |
353 | giacomo | 39 | ifeq ($(findstring OLD,$(TRACER)) , OLD) |
40 | CFG_OPT += -D__OLD_TRACER__ |
||
41 | endif |
||
42 | |||
588 | giacomo | 43 | C_OPT = -Wall -O -fno-builtin -nostdinc $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL) |
44 | ASM_OPT = -x assembler-with-cpp $(CFG_OPT) -I$(INCL) |
||
45 | LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH) |
||
2 | pj | 46 | |
588 | giacomo | 47 | MKDIR = mkdir |
145 | giacomo | 48 | CP = cp |
588 | giacomo | 49 | CAT = cat |
50 | RM = rm -f |
||
51 | RMDIR = rm -rf |
||
2 | pj | 52 | |
53 | # Common rules |
||
588 | giacomo | 54 | |
2 | pj | 55 | %.o : %.s |
56 | $(REDIR) $(CC) $(ASM_OPT) -c $< |
||
57 | %.o : %.c |
||
58 | $(REDIR) $(CC) $(C_OPT) -c $< |
||
588 | giacomo | 59 | %.s : %.c |
60 | $(REDIR) $(CC) $(C_OPT) -S $< |
||
61 |