Subversion Repositories shark

Rev

Rev 45 | Rev 66 | Go to most recent revision | Details | Compare with Previous | 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
45 pj 8
LIB_PATH    = $(BASE)/lib
9
OSLIB_PATH = $(OSLIB)/lib
2 pj 10
LIB_DIR  = $(BASE)/lib
48 pj 11
ifneq ($(OSLIB),)
12
	OTHERINCL = -I$(OSLIB)
13
else
14
	OTHERINCL =
15
endif
2 pj 16
 
17
LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a
18
LIBRARYDIR= $(LIB_PATH)
19
LIBRARYOBJS= $(LIB_OBJS)
20
 
21
 
22
C_WARN       = -Wimplicit-function-declaration -Wall
48 pj 23
C_FLAGS      = -O3 -finline-functions -fno-builtin -nostdinc
24
C_INC        = -I$(INCL) $(OTHERINCL)
2 pj 25
C_MAC        = -D__LINUX__
26
 
27
ASM_WARN     =
28
ASM_FLAGS    = -x assembler-with-cpp
48 pj 29
ASM_INC      = -I$(INCL) $(OTHERINCL)
2 pj 30
ASM_MAC      = -D__LINUX__
31
 
45 pj 32
LINK_OPT = -Bstatic -Ttext 0x220000 -s -nostartfiles -nostdlib -L$(LIB_PATH) -L$(OSLIB_PATH)
2 pj 33
 
34
C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
35
C_OUTPUT     = -o $*.o
36
 
37
ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
38
ASM_OUTPUT   = -o $*.o
39
 
40
MKDIR   = mkdir
41
CP	= cp
42
CAT	= cat
43
RM	= rm -f
44
CD	= cd
45
 
46
# Common rules
47
 
48
%.o : %.s
48 pj 49
	$(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<
2 pj 50
%.o : %.c
51
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
52
%.s : %.c
53
	$(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $<
54