Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8 Pro C Make File

Re: Oracle 8 Pro C Make File

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 27 Jan 1999 02:50:30 GMT
Message-ID: <36b07ed8.1503952@192.86.155.100>


A copy of this was sent to vadi8_at_my-dejanews.com (if that email address didn't require changing) On Tue, 26 Jan 1999 23:02:03 GMT, you wrote:

>I am new in the Oracle environment when it comes to creating/using MAKE files
>to compile Pro*C and C files. I have a bunch of C files and few Pro*C files
>which needs to be precompiled, compiled and linked to create an executable.
>When I tried to run the sample make file Demo_proc.mk provided by Oracle, I
>get a message saying "/home/oracle/product/8.0.4/lib/libclntsh.so' is up to
>date.". I have no idea what to do with it or how to proceed from here. Could
>someone please let me know what I need to do & it would be really great if you
>could provide as an example a working make file which could handle Pro*c & C
>files in it to create an executable.
>
>Thanks much in advance.
>
>...Vadi
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

I've found it easiest to just include the sample makefile included in the precompiler directory and use the symbolic in there to link with. For example, by including the proc sample .mk file, I can simply use " -L$(ORACLE_HOME)/lib $(PROLDLIBS)" in my link line to get the right oracle libs, regardless of version.

This is a makefile template I use alot. I set up the symbolics:

TARGET = name of program I want to create SOURCE = list of .pc files I need to precompile/compile

PROC_ENV_FLAGS = any settings I want to override at make time for ProC CC_ENV_FLAGS = any setting I want to override at make time for CC



$(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)



With the exception that the makefile has been renamed/moved from version to version (hence the symbolic ORACLE_PROC_MAKEFILE), this makefile works with 7.x and 8.x. The various settings for the oracle_proc_makefile would be:
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/demo_proc.mk
 

 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

--
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 Tue Jan 26 1999 - 20:50:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US