Re: PROC Makefiles

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 21 May 1998 02:33:37 GMT
Message-ID: <3564916c.7425467_at_192.86.155.100>


A copy of this was sent to Robert Ogren <rmogren_at_gte.net> (if that email address didn't require changing) On Wed, 20 May 1998 18:46:28 -0700, you wrote:

>Question:
>
>Does anyone have what library files need to be linked in with ProC
>Oracle 8.
>My 7.x does not seem to work because I get tons of unresolved externals.
>
>
>
>Thanks
>
>Rob

The makefile I like to use is fairly simple. It works with 7.0, 7.1, 7.2, 7.3 and 8.0. It is:



TARGET = programname
SOURCE = file1.pc file2.pc file3.pc

$(TARGET): $(SOURCE) $(SOURCE:.pc=.c) $(SOURCE:.pc=.o)

    $(CC) $(LDFLAGS) -t -o $(TARGET) \

        $(SOURCE:.pc=.o) -L$(ORACLE_HOME)/lib $(PROLDLIBS)

include $(ORACLE_PROC_MAKEFILE)

PROCFLAGS= ireclen=255 lines=yes $(PROC_ENV_FLAGS) \

           include=$(ORACLE_HOME)/proc/lib PROFLAGS=$(PROCFLAGS) CFLAGS=-I. -g $(CC_ENV_FLAGS)


You define TARGET, eg: TARGET = myprog , it will be the resulting binary.

You define SOURCE, eg: SOURCE = a.pc b.pc c.pc d.pc, it is a list of the .pc files that make up the application

You also define ORACLE_PROC_MAKEFILE it will be one of:

o70: setenv ORACLE_PROC_MAKEFILE $ORACLE_HOME/proc/demo/proc.mk
o71: setenv ORACLE_PROC_MAKEFILE $ORACLE_HOME/proc/demo/proc.mk
o72: setenv ORACLE_PROC_MAKEFILE $ORACLE_HOME/proc/demo/proc.mk
o73: setenv ORACLE_PROC_MAKEFILE $ORACLE_HOME/precomp/demo/proc/proc.mk
o8: setenv ORACLE_PROC_MAKEFILE $ORACLE_HOME/precomp/demo/proc/proc.mk

The symbolic PROLDLIBS will give you all fo the libraries you need.

I have PROCFLAGS and PROFLAGS in there because in 7.2 and before, the default rule for .pc to .c used PROFLAGS, in 7.3 and up they use PROCFLAGS.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu May 21 1998 - 04:33:37 CEST

Original text of this message