Subversion Repositories shark

Rev

Rev 336 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
308 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/
9
LIB_DIR  = $(BASE)/lib
10
 
308 giacomo 11
ifeq ($(TSC),TRUE)
353 giacomo 12
CFG_OPT += -D__TSC__
308 giacomo 13
ifeq ($(APIC),TRUE)
14
CFG_OPT += -D__APIC__
15
endif
16
endif
17
 
332 giacomo 18
ifeq ($(findstring 1000,$(TIMER_OPT)) , 1000)
19
CFG_OPT += -D__O1000__
20
else
21
ifeq ($(findstring 2000,$(TIMER_OPT)) , 2000)
22
CFG_OPT += -D__O2000__
23
else
24
ifeq ($(findstring 4000,$(TIMER_OPT)) , 4000)
25
CFG_OPT += -D__O4000__
26
else
336 giacomo 27
CFG_OPT += -D__O8000__
332 giacomo 28
endif
29
endif
30
endif
31
 
353 giacomo 32
ifeq ($(findstring NEW,$(TRACER)) , NEW)
33
CFG_OPT += -D__NEW_TRACER__
34
endif
35
ifeq ($(findstring OLD,$(TRACER)) , OLD)
36
CFG_OPT += -D__OLD_TRACER__
37
endif
38
 
308 giacomo 39
C_OPT =  -Wall -O -fno-builtin -nostdinc -D__LINUX__ $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL)
40
ASM_OPT =  -x assembler-with-cpp -D__LINUX__ $(CFG_OPT) -I$(INCL)
2 pj 41
LINK_OPT = -Bstatic -Ttext 0x220000 -s -nostartfiles -nostdlib -L$(LIB_PATH)
42
 
43
MKDIR   = mkdir
44
CP	= cp
45
CAT	= cat
46
RM	= rm -f
47
RMDIR	= rm -rf
48
 
49
# Common rules
50
 
51
%.o : %.s
52
	$(REDIR) $(CC) $(ASM_OPT) -c $<
53
%.o : %.c
54
	$(REDIR) $(CC) $(C_OPT) -c $<
55
%.s : %.c
56
	$(REDIR) $(CC) $(C_OPT) -S $<
57