Subversion Repositories shark

Rev

Rev 144 | Rev 353 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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