Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | CC = gcc |
2 | AS = gcc |
||
3 | LD = ld |
||
4 | AR = ar |
||
5 | |||
6 | |||
7 | INCL = $(BASE)/include |
||
8 | LIB_PATH = $(BASE)/lib |
||
9 | LIB_DIR = $(BASE)/lib |
||
10 | |||
11 | LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a |
||
12 | LIBRARYDIR= $(LIB_PATH) |
||
13 | LIBRARYOBJS= $(LIB_OBJS) |
||
14 | |||
15 | |||
16 | #LIBRARYPATHNAME= $(subst /,\,$(LIB_PATH)/lib$(LIBRARY).a) |
||
17 | #LIBRARYDIR= $(subst /,\,$(LIB_PATH)) |
||
18 | #LIBRARYOBJS= $(subst /,\,$(LIB_OBJS)) |
||
19 | |||
20 | |||
21 | C_WARN = -Wimplicit-function-declaration -Wall |
||
22 | C_FLAGS = -O -finline-functions -fno-builtin -nostdinc |
||
23 | C_INC = -I$(INCL) $(OTHERINCL) |
||
24 | C_MAC = -D__GNU__ |
||
25 | |||
26 | ASM_WARN = |
||
27 | ASM_FLAGS = -x assembler-with-cpp |
||
28 | ASM_INC = -I$(INCL) |
||
29 | ASM_MAC = -D__GNU__ |
||
30 | |||
31 | LINK_OPT = -Bstatic -Ttext 0x1720000 -oformat coff-go32 -s -nostartfiles -nostdlib -L$(LIB_PATH) |
||
32 | |||
33 | C_OPT = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS) |
||
34 | C_OUTPUT = -o $*.o |
||
35 | |||
36 | ASM_OPT = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS) |
||
37 | ASM_OUTPUT = -o $*.o |
||
38 | |||
39 | |||
40 | MKDIR = md |
||
41 | CP = cp |
||
42 | CAT = @type |
||
43 | RM = rm -f |
||
44 | CD = cd |
||
45 | |||
46 | #REDIR=redir -e $(*F).err |
||
47 | REDIR= |
||
48 | |||
49 | # Common rules |
||
50 | %.o : %.s |
||
51 | $(REDIR) $(CC) $(ASM_OPT) $(A_OUTPUT) -c $< |
||
52 | %.o : %.c |
||
53 | $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $< |
||
54 | %.s : %.c |
||
55 | $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $< |
||
56 |