include $(ORACLE_HOME)/precomp/lib/env_precomp.mk # 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. # SAMPLES=ejemplo_01 ejemplo_02 # # These targets are build all of a class of samples in one call to make. # samples: $(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) -L$(LIBHOME) $(PROLDLIBS) build_static: $(OBJS) $(CC) -o $(EXE) $(OBJS) -L$(LIBHOME) $(STATICPROLDLIBS) $(SAMPLES) $(OBJECT_SAMPLES): $(MAKE) -f $(MAKEFILE) OBJS=$@.o EXE=$@ build # # Here are some rules for converting .pc -> .c -> .o and for .typ -> .h. # # If proc needs to find .h files, it should find the same .h files that the # c compiler finds. We use a macro named INCLUDE to hadle that. The general # format of the INCLUDE macro is # INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ... # # Normally, I_SYM=-I, for the c compiler. However, we have a special target, # pc1, which calls $(PROC) with various arguments, include $(INCLUDE). It # is used like this: # $(MAKE) -f $(MAKEFILE) I_SYM=include= pc1 # This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE). .SUFFIXES: .pc .c .o .typ .h pc1: $(PROC) $(PROCFLAGS) iname=$(PCCSRC) $(INCLUDE) .pc.c: $(PROC) $(PROCFLAGS) iname=$* .pc.o: $(PROC) $(PROCFLAGS) iname=$* $(CC) $(CFLAGS) -c $*.c .c.o: $(CC) $(CFLAGS) -c $*.c .typ.h: $(OTT) intype=$*.typ hfile=$*.h outtype=$*o.typ $(OTTFLAGS) code=c user=scott/tiger # # The macro definition fill in some details or override some defaults from # other files. # 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 $(CPLUS_SYS_INCLUDE) 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