include $(ORACLE_HOME)/precomp/lib/env_precomp.mk # This is where your NETDC home directory is NETDC_HOME = -DNETDC_HOME\=\"/home/netdc\" # compiler command prefix - alter as needed CC = cc -g # This Makefile builds the sample programs in # $(ORACLE_HOME)/precomp/demo/proc, and can serve as a template for linking # customer applications. # # SAMPLES is a list of the c proc sample programs. # CPPSAMPLES is a list of the c++ proc sample programs. # OBJECT_SAMPLES is a list of the proc sample programs using the new # type features. You must install ott in addition to proc to run some # of those samples. # SAMPLES=meta2seed CPPSAMPLES= OBJECT_SAMPLES= USERLIBS = -L/usr/local/src/quanterra/qlib2 -lqlib2 POSIX = /usr/ccs/lib/values-xpg4.o # # These targets are build all of a class of samples in one call to make. # samples: $(SAMPLES) cppsamples: $(CPPSAMPLES) object_samples: $(OBJECT_SAMPLES) # # The target 'build' puts together an executable $(EXE) from the .o files # in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the # c sample programs. The rules to make .o files from .c and .pc files are # later in this file. # ($(PROLDLIBS) includes the client shared library, and $(STATICPROLDLIBS) does # not.) # build: $(OBJS) $(CC) -o $(EXE) $(OBJS) $(POSIX) -L$(LIBHOME) $(PROLDLIBS) build_static: $(OBJS) $(CC) -o $(EXE) $(OBJS) $(POSIX) -L$(LIBHOME) $(STATICPROLDLIBS) $(SAMPLES) $(OBJECT_SAMPLES): $(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ build # # The c++ samples are built using the 'cppbuild' target. It precompiles to # get a .c file, compiles to get a .o file and then builds the executable. # cppbuild: $(PROC) $(PROCPPFLAGS) iname=$(EXE) CC -c $(DEFINES) $(INCLUDE) $(EXE).c CC -o $(EXE) $(OBJS) -L$(LIBHOME) $(CPPLDLIBS) cppbuild_static: $(PROC) $(PROCPPFLAGS) iname=$(EXE) CC -c $(DEFINES) $(INCLUDE) $(EXE).c CC -o $(EXE) $(OBJS) -L$(LIBHOME) $(STATICCPPLDLIBS) $(CPPSAMPLES): $(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ cppbuild .SUFFIXES: .pc .c .o .typ .h pc1: $(PROC) $(PROCFLAGS) iname=$(PCCSRC) $(INCLUDE) .pc.c: $(PROC) $(PROCFLAGS) iname=$* .pc.o: $(PROC) $(PROCFLAGS) iname=$* $(CC) $(DEFINES) $(CFLAGS) -c $*.c $(POSIX) .c.o: $(CC) $(DEFINES) $(CFLAGS) -c $*.c $(POSIX) .typ.h: $(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c user= # # These are specific targets to make the .o files for samples that require # more careful handling. # OTTFLAGS=$(PCCFLAGS) CLIBS= $(TTLIBS_QA) $(LDLIBS) PRODUCT_LIBHOME= MAKEFILE=$(ORACLE_HOME)/precomp/demo/proc/demo_proc.mk PROCPLSFLAGS= sqlcheck=full userid=$(USERID) PROCPPFLAGS= code=cpp $(CCPSYSINCLUDE) USERID=scott/tiger NETWORKHOME=$(ORACLE_HOME)/network/ PLSQLHOME=$(ORACLE_HOME)/plsql/ INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(PLSQLHOME)public $(I_SYM)$(NETWORKHOME)public I_SYM=-I STATICPROLDLIBS=$(USERLIBS) $(SCOREPT) $(SSCOREED) $(DEF_ON) $(LLIBCLIENT) $(LLIBSQL) $(TTLIBS) PROLDLIBS=$(USERLIBS) $(LLIBCLNTSH) $(STATICPROLDLIBS) STATICCPPLDLIBS=$(SCOREPT) $(SSCOREED) $(DEF_ON) $(LLIBCLIENT) $(LLIBSQL) $(DEVTTLIBS) CPPLDLIBS=$(LLIBCLNTSH) $(STATICCPPLDLIBS)