makefile如下:include $(ORACLE_HOME)/precomp/lib/env_precomp.mk CCC=aCC +DA2.0W +DS2.0 -g -c OTT=ott PROC=procmossesmc_hp: esmc.o ideaplus.o code.o psmt.o aCC +DA2.0W +DS2.0 -o $@ esmc.o ideaplus.o code.o psmt.o -L$(LIBHOME) $(CPPLDLIBS) -Bstaticesmc.c:esmc.pc $(PROC) $(PROCPPFLAGS) USERID=anshan/anshan@etsossdb SQLCHECK=SEMANTICS iname=$*psmt.c:psmt.pc $(PROC) $(PROCPPFLAGS) USERID=anshan/anshan@etsossdb SQLCHECK=SEMANTICS iname=$*code.o:code.c code.h $(CCC) -g -c $(INCLUDE) $*.cideaplus.o:ideaplus.c ideaplus.h $(CCC) -g -c $(INCLUDE) $*.cesmc.o:esmc.c esmc.h ideaplus.h code.h $(CCC) -g -c $(INCLUDE) $*.cpsmt.o:psmt.c $(CCC) -g -c $(INCLUDE) $*.cclean: rm *.o esmc.c psmt.c mossesmc_hp # 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) <more args to make> I_SYM=include= pc1 # This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE). .SUFFIXES: .pc .c .o .typ .hpc1: $(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=anshan/anshan@etsossdb 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
CCC=aCC +DA2.0W +DS2.0 -g -c
OTT=ott
PROC=procmossesmc_hp: esmc.o ideaplus.o code.o psmt.o
aCC +DA2.0W +DS2.0 -o $@ esmc.o ideaplus.o code.o psmt.o -L$(LIBHOME) $(CPPLDLIBS) -Bstaticesmc.c:esmc.pc
$(PROC) $(PROCPPFLAGS) USERID=anshan/anshan@etsossdb SQLCHECK=SEMANTICS iname=$*psmt.c:psmt.pc
$(PROC) $(PROCPPFLAGS) USERID=anshan/anshan@etsossdb SQLCHECK=SEMANTICS iname=$*code.o:code.c code.h
$(CCC) -g -c $(INCLUDE) $*.cideaplus.o:ideaplus.c ideaplus.h
$(CCC) -g -c $(INCLUDE) $*.cesmc.o:esmc.c esmc.h ideaplus.h code.h
$(CCC) -g -c $(INCLUDE) $*.cpsmt.o:psmt.c
$(CCC) -g -c $(INCLUDE) $*.cclean:
rm *.o esmc.c psmt.c mossesmc_hp # 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) <more args to make> I_SYM=include= pc1
# This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE).
.SUFFIXES: .pc .c .o .typ .hpc1:
$(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=anshan/anshan@etsossdb
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
make -f makefile_hp clean
proc code=cpp sys_include='(/opt/aCC/include,/opt/aCC/include/SC,/opt/aCC/include/iostream,/opt/aCC/include/rw,/usr/include,/opt/aCC)' USERID=anshan/anshan@etsossdb SQLCHECK=SEMANTICS iname=esmc
proc code=cpp sys_include='(/opt/aCC/include,/opt/aCC/include/SC,/opt/aCC/include/iostream,/opt/aCC/include/rw,/usr/include,/opt/aCC)' USERID=anshan/anshan@etsossdb SQLCHECK=SEMANTICS iname=psmt
make -f makefile_hp mossesmc_hp