Subversion Repositories shark

Rev

Rev 2 | Rev 45 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

CC  = gcc
AS  = gcc
LD  = ld
AR  = ar


INCL   = $(BASE)/include
LIB_PATH    = $(BASE)/lib/
LIB_DIR  = $(BASE)/lib

LIBRARYPATHNAME= $(LIB_PATH)/lib$(LIBRARY).a
LIBRARYDIR= $(LIB_PATH)
LIBRARYOBJS= $(LIB_OBJS)


C_WARN       = -Wimplicit-function-declaration -Wall
C_FLAGS      = -O -finline-functions -fno-builtin -nostdinc
C_INC        = -I$(INCL) $(OTHERINCL)
C_MAC        = -D__LINUX__

ASM_WARN     =
ASM_FLAGS    = -x assembler-with-cpp
ASM_INC      = -I$(INCL)
ASM_MAC      = -D__LINUX__

LINK_OPT = -Bstatic -Ttext 0x220000 -s -nostartfiles -nostdlib -L$(LIB_PATH)

C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
C_OUTPUT     = -o $*.o

ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
ASM_OUTPUT   = -o $*.o

MKDIR   = mkdir 
CP      = cp
CAT     = cat
RM      = rm -f
CD      = cd

# Common rules

%.o : %.s
        $(REDIR) $(CC) $(ASM_OPT) $(A_OUTPUT) -c $<
%.o : %.c
        $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<
%.s : %.c
        $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -S $<