Subversion Repositories shark

Rev

Rev 572 | 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
 
572 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)
558 giacomo 45
LINK_OPT = -Bstatic -Ttext $(MEM_START) -s -nostartfiles -nostdlib -L$(LIB_PATH)
46
 
47
MKDIR   = mkdir
48
CP	= cp
49
CAT	= cat
50
RM	= rm -f
51
RMDIR	= rm -rf
52
 
53
# Common rules
54
 
55
%.o : %.s
56
	$(REDIR) $(CC) $(ASM_OPT) -c $<
57
%.o : %.c
58
	$(REDIR) $(CC) $(C_OPT) -c $<
59
%.s : %.c
60
	$(REDIR) $(CC) $(C_OPT) -S $<
61