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