Subversion Repositories shark

Rev

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

#
# Rules and common variables
#

HOSTNAME=$(shell uname)

ifeq ($(HOSTNAME),Linux)
else
ifeq ($(HOSTNAME),MS-DOS)
else
all:: 
        @echo System "$(HOSTNAME)" unknow
        @error
endif
endif

#
#
#

LIBNAME      = mpeg


#
INCLUDE_PATH = $(HARTIK)/h
LIB_PATH     = $(HARTIK)/lib

CC           = gcc

C_DEF_TOREMOVE = -D__GNU__

C_DEF        = -D_PARANOIA -D_GNU_SOURCE $(C_DEF_TOREMOVE)
C_WARN       = -Wimplicit-function-declaration -Wall
C_FLAGS      = -O -finline-functions -fno-builtin -nostdinc


C_INC        = -I. -I$(HARTIK)/include -I$(HARTIK)


#C_MAC        = -imacros $(HARTIK)/include/hartik/bdevconf.h
C_MAC        =
C_OPT        = $(C_DEF) $(C_WARN) $(C_INC) $(C_MAC) $(C_FLAGS)
C_OUTPUT     = -o $(notdir $*.o)

# for mpeg lib
C_DEF += -DHAVE_CONFIG_H -D__LINUX__ -DNOCONTROLS
C_INC += -I$(HARTIK)/../oskit/src/include -I$(HARTIK)/drivers/linuxcom/include 
C_INC += -I$(HARTIK)/h -I$(HARTIK)/h/sys -I$(HARTIK)/h/x86

ASM_DEF      =
ASM_WARN     =
ASM_FLAGS    =
ASM_INC      = -I. -I$(HARTIK)/include
ASM_MAC      =
ASM_OPT      = $(ASM_DEF) $(ASM_WARN) $(ASM_INC) $(ASM_MAC) $(ASM_FLAGS)
ASM_OUTPUT   = -o $*.o


%.o : %.c
        $(REDIR) $(CC) $(C_OPT) $(C_OUTPUT) -c $<

%.o : %.S
        $(REDIR) $(CC) $(ASM_OPT) $(ASM_OUTPUT) -c $<