Subversion Repositories shark

Rev

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