CC = gcc
WRES = windres
HOMEV = /usr/src/linux-2.6.32.21
VPATH = $(HOMEV)/include
oDir = .
Bin = .
Src = .
libDirs =
incDirs =
LIBS = -s -rdynamic -L/usr/lib/mysql -lmysqlclient
C_FLAGS += -I/usr/include/mysql/ -DBIG_JOINS=1 -fno-strict-aliasing -DUNIV_LINUX -DUNIV_LINUX -Wl,-Bsymbolic-functions
#C_FLAGS = -O -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -DUNIV_LINUX -DUNIV_LINUX -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient
SRCS =\
$(Src)/main.c\
# $(Src)/getfileargv.c\
# $(Src)/bdidll.c\
# $(Src)/bdisetup.c
EXOBJS =\
$(oDir)/main.o\
# $(oDir)/getfileargv.o\
#$(oDir)/bdidll.o\
#$(oDir)/bdisetup.o
ALLOBJS = $(EXOBJS)
ALLBIN = $(Bin)/app
ALLTGT = $(Bin)/app
# User defines:
#@# Targets follow ---------------------------------
all: $(ALLTGT)
objs: $(ALLOBJS)
cleanobjs:
rm -f $(ALLOBJS)
cleanbin:
rm -f $(ALLBIN)
cleantgt:
rm -f $(ALLTGT)
clean: cleanobjs cleanbin
cleanall: cleanobjs cleanbin cleantgt
#@# User Targets follow ---------------------------------
#@# Dependency rules follow -----------------------------
#--- list all bin file ----------------------------------
$(ALLTGT): $(EXOBJS)
$(CC) -o $(ALLBIN) $(EXOBJS) $(incDirs) $(libDirs) $(LIBS)
#--------------------------------------------------------
#---- compile all *.c to *.c ------
%.o : %.c
$(CC) $(C_FLAGS) $(incDirs) -c -o $@ $<
#--- another way to compile *.c to *.o------
#$(oDir)/main.o : main.c
# $(CC) $(C_FLAGS) $(incDirs) -c -o $@ $<
#--------------------------------------------------------