Subversion Repositories shark

Rev

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