Subversion Repositories shark

Rev

Rev 399 | Rev 556 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
308 giacomo 1
include $(BASE)/shark.cfg
2
 
82 pj 3
CPP = gcc
2 pj 4
CC  = gcc
5
AS  = gcc
6
LD  = ld
7
AR  = ar
8
 
9
INCL   = $(BASE)/include
45 pj 10
LIB_PATH    = $(BASE)/lib
64 pj 11
OSLIB = $(BASE)/oslib
45 pj 12
OSLIB_PATH = $(OSLIB)/lib
2 pj 13
LIB_DIR  = $(BASE)/lib
14
 
15
LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a
16
LIBRARYDIR= $(LIB_PATH)
17
LIBRARYOBJS= $(LIB_OBJS)
18
 
308 giacomo 19
ifeq ($(TSC),TRUE)
353 giacomo 20
CFG_OPT += -D__TSC__
308 giacomo 21
ifeq ($(APIC),TRUE)
22
CFG_OPT += -D__APIC__
23
endif
24
endif
25
 
353 giacomo 26
ifeq ($(findstring NEW,$(TRACER)) , NEW)
27
CFG_OPT += -D__NEW_TRACER__
28
endif
29
ifeq ($(findstring OLD,$(TRACER)) , OLD)
30
CFG_OPT += -D__OLD_TRACER__
399 giacomo 31
endif
362 giacomo 32
INCL += -I$(BASE)/tracer/include
353 giacomo 33
 
450 giacomo 34
ifeq ($(findstring VM86,$(BIOS)) , VM86)
35
CFG_OPT += -DVM86
36
endif
37
 
2 pj 38
C_WARN       = -Wimplicit-function-declaration -Wall
112 giacomo 39
C_FLAGS      = -O -fno-builtin -nostdinc
66 pj 40
C_INC        = -I$(INCL) $(OTHERINCL) -I$(OSLIB)
311 giacomo 41
C_MAC        = -D__LINUX__ $(CFG_OPT)
2 pj 42
 
43
ASM_WARN     =
44
ASM_FLAGS    = -x assembler-with-cpp
66 pj 45
ASM_INC      = -I$(INCL) $(OTHERINCL) -I$(OSLIB)
311 giacomo 46
ASM_MAC      = -D__LINUX__ $(CFG_OPT)
2 pj 47
 
45 pj 48
LINK_OPT = -Bstatic -Ttext 0x220000 -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH)
2 pj 49
 
311 giacomo 50
C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
2 pj 51
C_OUTPUT     = -o $*.o
52
 
53
ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
54
ASM_OUTPUT   = -o $*.o
55
 
56
MKDIR   = mkdir
57
CP	= cp
58
CAT	= cat
59
RM	= rm -f
60
CD	= cd
61
 
62
# Common rules
63
 
64
%.o : %.s
48 pj 65
	$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<
2 pj 66
%.o : %.c
67
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
68
%.s : %.c
69
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $<
82 pj 70
%.o : %.cpp
71
	$(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $<