Rev 146 | Rev 353 | 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) |
10 | CFG_OPT = -D__TSC__ |
||
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 | |||
30 | C_WARN = -Wimplicit-function-declaration -Wall |
||
112 | giacomo | 31 | C_FLAGS = -O -fno-builtin -nostdinc |
66 | pj | 32 | C_INC = -I$(INCL) $(OTHERINCL) -I$(OSLIB) |
311 | giacomo | 33 | C_MAC = -D__GNU__ $(CFG_OPT) |
2 | pj | 34 | |
35 | ASM_WARN = |
||
36 | ASM_FLAGS = -x assembler-with-cpp |
||
66 | pj | 37 | ASM_INC = -I$(INCL) -I$(OSLIB) |
311 | giacomo | 38 | ASM_MAC = -D__GNU__ $(CFG_OPT) |
2 | pj | 39 | |
146 | giacomo | 40 | LINK_OPT = -Bstatic -Ttext 0x1720000 -b coff-go32 --oformat coff-go32 -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH) |
2 | pj | 41 | |
42 | C_OPT = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS) |
||
43 | C_OUTPUT = -o $*.o |
||
44 | |||
45 | ASM_OPT = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS) |
||
46 | ASM_OUTPUT = -o $*.o |
||
47 | |||
48 | |||
49 | MKDIR = md |
||
50 | CP = cp |
||
51 | CAT = @type |
||
52 | RM = rm -f |
||
53 | CD = cd |
||
54 | |||
55 | #REDIR=redir -e $(*F).err |
||
56 | REDIR= |
||
57 | |||
58 | # Common rules |
||
59 | %.o : %.s |
||
136 | giacomo | 60 | $(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $< |
2 | pj | 61 | %.o : %.c |
62 | $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $< |
||
63 | %.s : %.c |
||
64 | $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $< |
||
82 | pj | 65 | %.o : %.cpp |
66 | $(REDIR) $(CPP) $(C_OPT) $(C_OUTPUT) -c $< |
||
2 | pj | 67 |