全部博文(51)
分类: C/C++
2008-09-24 17:43:22
#---------------------------------------------
.c.o:
cc -m32 -D_M_TERMINFO -g -c $(SYS) $(INCL) $<
.sqc.o:
db2 connect to test
db2 prep $< bindfile
db2 bind $*.bnd
db2 connect reset
$(LINK.c) -s -c $(SYS) $(INCL) $*.c
rm $*.c
echo $*.bnd >>$(BINDFILE_LIST)
mv $*.bnd $(BINDFILE)
.SUFFIXES: .sqc .o
#---------------------------------------------
SYS=-DUNIX
WORKDIR=$(HOME)
BINDFILE=$(WORKDIR)/bindfile/
BINDFILE_LIST=$(BINDFILE)filelist
INCL=-I. -I$(WORKDIR)/incl
DB2 = /opt/IBM/db2/V8.1
INCLUDE = -I$(DB2)/include
LIBFLAGS = -L$(DB2)/lib -lm -ldb2
LINK.c = cc -m32 $(INCLUDE) $(LIBFLAGS)