DB2下嵌入C(sqC) 的编译,连接,环境,路径,make file 的问题


GCC=gcc
CC=gcc



DB2PATH=/××××/××××/sqllib
CCFLAGS=-g

CFLAGS=  -I$(DB2PATH)/include

LIBS= -L $(DB2PATH)/lib   -ldb2
UID=XXXX
PWD=XXX
DB=XXX

BILLHOME=.
BILLBIN=.
BILLSRC=$(BILLHOME)
BILLOBJ=$(BILLHOME)
BILLLIB=../lib

INCLUDE=-I. -I$(BILLHOME)/src -I$(BILLLIB) \
       -I$(DB2PATH)/include \
       -I/usr/lib -I/usr/local/include \
       -I/usr/include


TARGET1 = $(BILLBIN)/test
all(TARGET1)

.sqc.o:
        db2 connect to $(DB) user $(UID) using $(PWD);\
        db2 prep $*.sqc bindfile;\
        db2 bind $*.bnd;\
        db2 connect reset;\
        $(CC) $(INCLUDE) -o  $*.o -c  $(CCFLAGS) $(CFLAGS) $(DEFS)  $*.c ;

.c.o:
        $(CC) $ (INCLUDE) -o  $*.o -c  $(CCFLAGS) $(CFLAGS) $(LIBS) $(DEFS) $*.c --def \standard.def


PICK_OBJS1= $(BILLSRC)/test.o

$(BILLBIN)/test:    $(PICK_OBJS1)
        $(CC) $(CFLAGS) -o $(TARGET1)  $(PICK_OBJS1)  $(ORACLE_LIB)$(LINKFLAG) $(LIBS)

clean:
        rm -f *.o $(TARGET1) test.c test.o test.bnd

你可能感兴趣的:(DB2下嵌入C(sqC) 的编译,连接,环境,路径,make file 的问题)