Subversion Repositories shark

Rev

Rev 311 | 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
27
CFG_OPT += -D__OSLOW__
28
endif
29
endif
30
endif
31
 
311 giacomo 32
C_OPT =  -Wall -O -fno-builtin -nostdinc $(CFG_OPT) -D__GNU__ -I$(INCL) -DMAIN=__kernel_init__
33
ASM_OPT =  -x assembler-with-cpp $(CFG_OPT) -D__GNU__ -I$(INCL)
40 pj 34
LINK_OPT = -T $(BASE)/mk/os.x -Bstatic -Ttext 0x320000 -oformat coff-go32 -s -nostartfiles -nostdlib -L$(LIB_PATH)
2 pj 35
 
36
MKDIR	= md
145 giacomo 37
CP	= cp
2 pj 38
CAT	= @type
39
RM	= -del
40
RMDIR	= -deltree
41
 
42
# Common rules
43
%.o : %.s
44
	$(REDIR) $(CC) $(ASM_OPT) -c $<
45
%.o : %.c
46
	$(REDIR) $(CC) $(C_OPT) -c $<