# Generated automatically from Makefile.in by configure. ############################################################################### # # Oratcl-2.5 # Makefile.in for Oratcl configure # # Tom Poindexter ORATCL_VERSION = 2.5 ORATCL_LIBVER = 25 SHELL = /bin/sh ############################################################################### # # set the following defines as needed: prefix = /usr/local exec_prefix = /usr/local # alternative defs #prefix = /usr/local #exec_prefix = /usr/local #------------------------------------------------------------------------------ # define where Oratcl should put binaries, libraries, and mapages # BIN_DIR = $(exec_prefix)/bin LIB_DIR = $(exec_prefix)/lib MAN_DIR = $(prefix)/man MANN_DIR = $(MAN_DIR)/mann #------------------------------------------------------------------------------ # define where Tcl include and libraries are located # Oratcl assumes that Tcl, Tk (and possibly Extended Tcl) are installed # in the same locations TCL_INC_DIR = /usr/local/include TCL_LIB_DIR = /usr/local/lib #------------------------------------------------------------------------------ # define Tcl, Tk, TclX libraries and extra libs TCL_VERSION = 8.0 TK_VERSION = 8.0 TCL_LIB_SPEC = -L/usr/local/lib -ltcl8.0${DBGX} TCL_LIBS = -ldl -lm TK_LIB_SPEC = -L/usr/local/lib/tk8.0 -ltk8.0${DBGX} TK_LIBS = -L/usr/openwin/lib -lX11 -ldl -lsocket -lnsl -lm TK_XINCLUDES = -I/usr/openwin/include TK_XLIBSW = -L/usr/openwin/lib -lX11 TCLX_LIB_SPEC = TCLX_LIBS = TCLX_LIB_LOC = TCLX_LIB_SEP = / TKX_LIB_SPEC = TKX_LIBS = # grab the versions from TclX, needed to find TclX appinit files TCLX_FULL_VERSION = TKX_FULL_VERSION = #------------------------------------------------------------------------------ # compiler and flags from tcl config, so don't change CC # without some thought, otherwise you might break the shared flags. CC = gcc #CC = purify -chain-length="13" cc -Xc OPT_DEBUG = -O #OPT_DEBUG = -g -DORATCL_MEM_DEBUG #OPT_DEBUG = -g -DORATCL_MEM_DEBUG -DORATCL_MEM_FULL_DEBUG TCL_DEFS = $(OPT_DEBUG) -DUSEGETWD=1 -DNO_STRERROR=1 -DNO_GETWD=1 -DNO_WAIT3=1 -DNO_UNAME=1 -DNO_DIRENT_H=1 -DNO_STDLIB_H=1 -DNO_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DNO_ERF=1 -DNO_LGAMMA=1 -DNO_JN=1 -DNO_YN=1 -DNO_FD_SET=1 -DHAVE_SYS_TIME_H=1 -DTM_IN_SYS_TIME=1 -Dmode_t=int -Dpid_t=int -Dsize_t=unsigned -Duid_t=int -Dgid_t=int -DUSE_DIRENT2_H=1 -DNO_UNION_WAIT=1 -DRETSIGTYPE=int -Dvfork=fork -DNO_GETTOD=1 -DGETTOD_NOT_DECLARED=1 -DHAVE_NET_ERRNO_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DNO_BCOPY=1 TCL_LD_FLAGS = TCL_SHLIB_SUFFIX = .so TCL_SHLIB_CFLAGS = -KPIC TCL_SHLIB_LD = /usr/ccs/bin/ld -G -z text TCL_SHLIB_LD_LIBS = #------------------------------------------------------------------------------ # define names for Oratcl tclsh/tcl executable TCL_EXEC = tclsh TCLX_EXEC = tcl #------------------------------------------------------------------------------ # define names for Oratcl wish/wishx executable WISH_EXEC = wish WISHX_EXEC = wishx #------------------------------------------------------------------------------ # define names for Oratcl library files, static and shared LIB_ORATCL = libOratcl$(ORATCL_LIBVER).a LNK_ORATCL = -lOratcl$(ORATCL_LIBVER) LIB_SH_ORATCL = libOratcl$(ORATCL_LIBVER)$(TCL_SHLIB_SUFFIX) #------------------------------------------------------------------------------ # define where Oracle libraries are located ORACLE_HOME = /export/home/oracle/app/oracle/product/8.0.4 ORA = /export/home/oracle/app/oracle/product/8.0.4/lib ORA_LIB_DIR = $(ORA) ORAVER = -DVERSION7 ORA72FEATURES = -DNONBLOCK_CURSOR ORA_SH_LIB = #ORA_SYS_LIBS = ${ORA}/naeet.o ${ORA}/naect.o ${ORA}/naedhs.o ORA_SYS_LIBS = ${ORA}/naeet.o ${ORA}/naect.o ${ORA}/naedhs.o ${ORACLE_HOME}/rdbms/lib/kpudfo.o ${ORACLE_HOME}/rdbms/lib/sskrsed.o #ORA_SYS_LIBS = OCILIB = ${ORA}/libclient.a ${ORA}/libcommon.a ${ORA}/libgeneric.a ${ORA}/libmm.a ${ORA}/libnetv2.a ${ORA}/libnetwork.a ${ORA}/libncr.a ${ORA}/libnlsrtl3.a ${ORA}/libnttcp.a ${ORA}/libepc.a ${ORA}/libcore4.a #OCILIB = ${ORA}/libclient.a ${ORA}/libcommon.a ${ORA}/libgeneric.a ${ORA}/libsqlnet.a ${ORA}/libncr.a ${ORA}/libepc.a ${ORA}/libcore3.a ${ORA}/libnlsrtl3.a ${ORA}/libc3v6.a # Oracle 7.3 needs some objects removed, otherwise there are lots of # unresolved symbols. OCIIGNORE = snmspu.o snmsp.o snmd.o snmitcl.o # other machine specific libs that oracle might need. these are initially # populated from ORACLE_HOME/rdbms/lib/sysliblist # by configure. adjust as needed. OTHER_ORA_LIBS = -lc -laio -lm -lthread # AIX apparently requires this OCIMILI = # some versions of oracle require explicit linking with libc, without -lc, # the link appears fine, but executing 'oralogon' causes a core dump. default # is to define libc explicitly. LIBC = -lc -lnsl -lsocket #------------------------------------------------------------------------------ # OTHER_LD_SEARCH_FLAGS so that dynamic loader will look for Oracle libraries # NOTE: these are hacked from TCL_LD_SEARCH_FLAGS, and may need tweaking # for a particular platform. LIB_INSTALL_DIR used in tcl7.5, # LIB_RUNTIME_DIR used in tcl7.5p1+. If your linker doesn't like a colon # separated path, then you will have to figure out what works, or # possible leave off the second lib. The inclusion of the Tcl lib dir is # for the occasion you are building a static lib, but a shared Tcl lib is # found during linking. LIB_INSTALL_DIR = /usr/local/lib:/export/home/oracle/app/oracle/product/8.0.4/lib:/usr/openwin/lib LIB_RUNTIME_DIR = /usr/local/lib:/export/home/oracle/app/oracle/product/8.0.4/lib:/usr/openwin/lib OTHER_LD_SEARCH_FLAGS = -R ${LIB_RUNTIME_DIR} # Include tcl's cc flags for dynamic lib search path. This is in case you # are builing a static binary for Oratcl, but have both static and dynamic # tcl libraries, of which the loader will probably prefer the dynamic verisons. # Without this flag, the resulting binary won't have lib search information. # Note that TCL_LD_SEARCH_FLAGS only works when LIB_RUNTIME_DIR has been set # as above. TCL_LD_SEARCH_FLAGS = -Wl,-R,${LIB_RUNTIME_DIR} #------------------------------------------------------------------------------ # define man page MAN_PAGE = oratcl.n #------------------------------------------------------------------------------ # define ranlib command for systems that need it; touch otherwise RANLIB = : #------------------------------------------------------------------------------ # how to install INSTALL = ./install.sh -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 # # end of defines # ############################################################################### T_EXEC = ${TCL_EXEC} W_EXEC = ${WISH_EXEC} all: ${TCL_EXEC} ${WISH_EXEC} #------------------------------------------------------------------------------ # how to build objects for oratcl and libOratcl oratcl.o: ../generic/oratcl.c $(LIB_ORATCL) $(CC) -c -I$(TCL_INC_DIR) $(ORAVER) $(ORA72FEATURES) $(TCL_DEFS) \ ../generic/oratcl.c ar cr $(LIB_ORATCL) oratcl.o -$(RANLIB) $(LIB_ORATCL) touch oratcl.o shoratcl.o: ../generic/oratcl.c $(CC) -c -I$(TCL_INC_DIR) $(ORAVER) $(ORA72FEATURES) $(TCL_DEFS) \ $(TCL_SHLIB_CFLAGS) ../generic/oratcl.c mv -f oratcl.o shoratcl.o $(LIB_ORATCL): $(OCILIB) @echo "building initial libOratcl$(ORATCL_LIBVER).a" -mkdir libtmp -rm -f libtmp/* -for L in $(OCILIB) ; do \ cd libtmp ; \ echo " adding objects from $$L" ; \ ar x $$L || cp $$L . ; \ rm -f $(OCIIGNORE) ; \ ar cr ../$(LIB_ORATCL) * ; \ rm -f *.o *.a ; \ cd .. ; \ done ; -rm -f libtmp/* $(LIB_SH_ORATCL): shoratcl.o $(TCL_SHLIB_LD) $(OTHER_LD_SEARCH_FLAGS) \ -o $(LIB_SH_ORATCL) shoratcl.o \ -L$(ORA_LIB_DIR) $(ORA_SH_LIB) $(ORA_SYS_LIBS) \ $(TCL_LIB_SPEC) $(TCL_LIBS) \ $(OTHER_ORA_LIBS) $(OCIMILI) $(LIBC) -$(RANLIB) $(LIB_SH_ORATCL) #------------------------------------------------------------------------------ # how to build objects for standard tcl TCL_APPINIT = $(TCL_LIB_DIR)/tcl$(TCL_VERSION)/tclAppInit.c TK_APPINIT = $(TCL_LIB_DIR)/tk$(TK_VERSION)/tkAppInit.c tclAppInit.c: $(TCL_APPINIT) sed -f orainit.sed <$(TCL_APPINIT) >tclAppInit.c tkAppInit.c: $(TK_APPINIT) sed -f orainit.sed <$(TK_APPINIT) >tkAppInit.c tclAppInit.o: tclAppInit.c $(CC) -c -I$(TCL_INC_DIR) $(TCL_DEFS) tclAppInit.c tkAppInit.o: tkAppInit.c $(CC) -c -I$(TCL_INC_DIR) $(TK_XINCLUDES) tkAppInit.c #------------------------------------------------------------------------------ # how to build objects for neosoft extended tcl TCLX_APPINIT = $(prefix)/$(TCLX_LIB_LOC)tclX$(TCLX_LIB_SEP)$(TCLX_FULL_VERSION)/tclXAppInit.c TKX_APPINIT = $(prefix)/$(TCLX_LIB_LOC)tkX$(TCLX_LIB_SEP)$(TKX_FULL_VERSION)/tkXAppInit.c tclXAppInit.c: $(TCLX_APPINIT) sed -f orainit.sed <$(TCLX_APPINIT) >tclXAppInit.c tkXAppInit.c: $(TKX_APPINIT) sed -f orainit.sed <$(TKX_APPINIT) >tkXAppInit.c tclXAppInit.o: tclXAppInit.c $(CC) -c -I$(TCL_INC_DIR) $(TCL_DEFS) tclXAppInit.c tkXAppInit.o: tkXAppInit.c $(CC) -c -I$(TCL_INC_DIR) $(TCL_DEFS) $(TK_XINCLUDES) tkXAppInit.c #------------------------------------------------------------------------------ # how to build static executables and man page $(TCL_EXEC): $(LIB_ORATCL) oratcl.o tclAppInit.o $(CC) tclAppInit.o $(TCL_LD_FLAGS) $(TCL_LD_SEARCH_FLAGS) \ -L. $(LNK_ORATCL) $(ORA_SYS_LIBS) \ $(TCL_LIB_SPEC) $(TCL_LIBS) \ $(OTHER_ORA_LIBS) $(OCIMILI) $(LIBC) -o $(TCL_EXEC) $(WISH_EXEC): $(LIB_ORATCL) oratcl.o tkAppInit.o $(CC) tkAppInit.o $(TCL_LD_FLAGS) $(TCL_LD_SEARCH_FLAGS) \ -L. $(LNK_ORATCL) $(ORA_SYS_LIBS) \ $(TK_LIB_SPEC) $(TK_LIBS) \ $(TCL_LIB_SPEC) $(TCL_LIBS) \ $(OTHER_ORA_LIBS) $(OCIMILI) $(LIBC) -o $(WISH_EXEC) $(TCLX_EXEC): $(LIB_ORATCL) oratcl.o tclXAppInit.o $(CC) tclXAppInit.o $(TCL_LD_FLAGS) $(TCL_LD_SEARCH_FLAGS) \ -L. $(LNK_ORATCL) $(ORA_SYS_LIBS) \ $(TCLX_LIB_SPEC) \ $(TCL_LIB_SPEC) $(TCLX_LIBS) $(TCL_LIBS) \ $(OTHER_ORA_LIBS) $(OCIMILI) $(LIBC) -o $(TCLX_EXEC) $(WISHX_EXEC): $(LIB_ORATCL) oratcl.o tkXAppInit.o $(CC) tkXAppInit.o $(TCL_LD_FLAGS) $(TCL_LD_SEARCH_FLAGS) \ -L. $(LNK_ORATCL) $(ORA_SYS_LIBS) \ $(TKX_LIB_SPEC) $(TCLX_LIB_SPEC) \ $(TK_LIB_SPEC) $(TCL_LIB_SPEC) \ $(TK_LIBS) $(TKX_LIBS) $(TCLX_LIBS) $(TCL_LIBS) \ $(OTHER_ORA_LIBS) $(OCIMILI) $(LIBC) -o $(WISHX_EXEC) $(MAN_PAGE): ../doc/oratcl.man cp ../doc/oratcl.man $(MAN_PAGE) man-formatted: ../doc/oratcl.man rman -f html ../doc/oratcl.man > ../doc/oratcl.html nroff -man ../doc/oratcl.man > ../doc/oratcl.txt groff -Tps -man ../doc/oratcl.man > ../doc/oratcl.ps #------------------------------------------------------------------------------ # install targets install: install-static install-man install-shared: $(LIB_SH_ORATCL) @echo installing $(LIB_SH_ORATCL) $(INSTALL_PROGRAM) $(LIB_SH_ORATCL) $(LIB_DIR)/$(LIB_SH_ORATCL) @echo installing pkgIndex.tcl -mkdir $(LIB_DIR)/Oratcl$(ORATCL_LIBVER) $(INSTALL_PROGRAM) pkgIndex.tcl $(LIB_DIR)/Oratcl$(ORATCL_LIBVER)/pkgIndex.tcl install-static: ${TCL_EXEC} ${WISH_EXEC} $(LIB_ORATCL) @for f in $(T_EXEC) $(W_EXEC) ; do \ if test -x $$f ; then \ echo installing $$f; \ $(INSTALL_PROGRAM) $$f $(BIN_DIR)/$$f ; \ fi ; \ done @echo installing $(LIB_ORATCL) $(INSTALL_DATA) $(LIB_ORATCL) $(LIB_DIR)/$(LIB_ORATCL) install-man: $(MAN_PAGE) @echo installing $(MAN_PAGE) $(INSTALL_DATA) $(MAN_PAGE) $(MANN_DIR)/$(MAN_PAGE) install-wosql: sed -e '1s@^.*$$@#!$(BIN_DIR)/$(W_EXEC)@p' \ $(BIN_DIR)/wosql chmod 755 $(BIN_DIR)/wosql clean: rm -f $(T_EXEC) $(W_EXEC) $(MAN_PAGE) \ oratcl.o shoratcl.o $(LIB_ORATCL) $(LIB_SH_ORATCL) \ tclXAppInit.c tkXAppInit.c tclXAppInit.o tkXAppInit.o \ tclAppInit.c tkAppInit.c tclAppInit.o tkAppInit.o \ config.cache config.log ############################################################################### # end of Makefile ###############################################################################