我得到了一个makefile,我将其修改为:
############################################
# Makefile using OCI (Oracle Call Interface)
# D. LaRue - May, 2001
############################################
ORACLE_HOME=/opt/oratcp11/product/11.2.0/client11R2_32bits
CC=/opt/SUNWspro/SUNWspro12/sparc/SUNWspro/bin/cc
COMMON_SRC=../common
BNS_INCLUDE=../include
LIBHOME=$(ORACLE_HOME)/lib/
RDBMSLIB=$(ORACLE_HOME)/rdbms/lib/
WSSCOMMON_LIB=/vobs/wssCommon/lib_32
TARGET_DIR=.
LLIBCRYPTO =-lbnscrypto
LSOLCRYPTO =-lcryptoutil -lpkcs11
WSSLIBS =-lwssmbx -ldes
LIBRDBMS_CLT =-lclient11 -lvsn11 -lcommon11 -lgeneric11 -lmm
LLIBCLNTSH =-lclntsh -ldl
CORELIBS =-lcore11 -lnls11
LDLIBS =-lnsl -lsocket -lgen -lm
EXSYSLIBS =-R $(ORACLE_HOME)/lib
STATICTTLIBS =$(LLIBRDBMS_CLT) $(CORELIBS) $(WSSLIBS) $(LLIBCRYPTO)
OCISHAREDLIBS =$(LLIBCLNTSH) $(LDLIBS) -Bstatic $(STATICTTLIBS) -Bdynamic $(LSOLCRYPTO)
LDFLAGS =-L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/rdbms/lib -L$(WSSCOMMON_LIB) -L../lib_32
INCLUDE =-I$(ORACLE_HOME)/rdbms/demo -I$(ORACLE_HOME)/rdbms/public -I$(ORACLE_HOME)/plsql/public -I$(ORACLE_HOME)/network/public -I$(COMMON_SRC) -I$(BNS_INCLUDE) -I.
CFLAGS =$(INCLUDE) $(LDFLAGS) -g -Xt
BESSOBJS=bessToWss.o
COMMONLIST=$(COMMON_SRC)/oracle.c \
$(COMMON_SRC)/logger.c
INTFOBJS=$(BESSOBJS) $(COMMONLIST)
ALL: $(TARGET_DIR)/bessToWss
$(TARGET_DIR)/bessToWss: $(INTFOBJS)
$(CC) $(CFLAGS) $(INTFOBJS) $(OCISHAREDLIBS) -o $@
clean:
$(RM) *.o
当我运行文件时出现错误
". Stop.e: Error: Don't know how to make "bessToWss
知道有什么问题吗?我通过脚本在一些 Unix 机器上运行它。在设置一些路径或一些其他设置之后,脚本调用 make。如您所见,我不确定它是如何调用的。
谢谢 :)