Subversion Repositories shark

Rev

Rev 1061 | 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
 
1073 tullio 43
ifeq ($(findstring GCC4,$(COMPILER)) , GCC4)
1061 tullio 44
# this options are for newer gcc4 compilers
1056 tullio 45
C_OPT =  -Wall -O -fno-builtin -nostdinc -Wno-attributes -Wno-pointer-sign -minline-all-stringops $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL)
1073 tullio 46
endif
47
 
48
ifeq ($(findstring GCC3,$(COMPILER)) , GCC3)
49
C_OPT =  -Wall -O -fno-builtin -nostdinc -minline-all-stringops $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL)
50
endif
51
 
52
ifeq ($(findstring DJGPP,$(COMPILER)) , DJGPP)
53
C_OPT =  -Wall -O -fno-builtin -nostdinc -minline-all-stringops $(CFG_OPT) -DMAIN=__kernel_init__ -I$(INCL)
54
endif
55
 
572 giacomo 56
ASM_OPT =  -x assembler-with-cpp $(CFG_OPT) -I$(INCL)
558 giacomo 57
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH)
58
 
59
MKDIR   = mkdir
60
CP	= cp
61
CAT	= cat
62
RM	= rm -f
63
RMDIR	= rm -rf
64
 
65
# Common rules
66
 
67
%.o : %.s
68
	$(REDIR) $(CC) $(ASM_OPT) -c $<
69
%.o : %.c
70
	$(REDIR) $(CC) $(C_OPT) -c $<
71
%.s : %.c
72
	$(REDIR) $(CC) $(C_OPT) -S $<
73