Subversion Repositories shark

Rev

Rev 336 | Rev 588 | Go to most recent revision | 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/
9
LIB_DIR  = $(BASE)\lib
10
 
311 giacomo 11
ifeq ($(TSC),TRUE)
12
CFG_OPT = -D__TSC__
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
 
311 giacomo 39
C_OPT =  -Wall -O -fno-builtin -nostdinc $(CFG_OPT) -D__GNU__ -I$(INCL) -DMAIN=__kernel_init__
40
ASM_OPT =  -x assembler-with-cpp $(CFG_OPT) -D__GNU__ -I$(INCL)
40 pj 41
LINK_OPT = -T $(BASE)/mk/os.x -Bstatic -Ttext 0x320000 -oformat coff-go32 -s -nostartfiles -nostdlib -L$(LIB_PATH)
2 pj 42
 
43
MKDIR	= md
145 giacomo 44
CP	= cp
2 pj 45
CAT	= @type
46
RM	= -del
47
RMDIR	= -deltree
48
 
49
# Common rules
50
%.o : %.s
51
	$(REDIR) $(CC) $(ASM_OPT) -c $<
52
%.o : %.c
53
	$(REDIR) $(CC) $(C_OPT) -c $<