automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automake with Pro*C


From: Sebastien REYNES
Subject: Re: Automake with Pro*C
Date: Fri, 29 Aug 2008 09:37:43 +0200

Thank you for your answer Ralf. I have found a solution to do what I wanted
:

lib_LIBRARIES = libcompc.a
libcompc_a_SOURCES = ate_u0002.pc ate_u0008.pc ate_u0009.pc ate_u0100.pc
INCLUDES = -I$(ORACLE_HOME)/precomp/public -I/usr/include
SUFFIXES = .o .c .pc
.pc.c:
        $(ORACLE_HOME)/bin/proc -DANSI_PRO_C mode=ansi code=ansi_c lines=yes
iname=$<
.c.o:
        $(CC) -c $<

These commands allow to create a static library from Pro*C files. I have now
to link the library to create the executables using it.

Regards,
Sébastien

----- Original Message -----
From: "Ralf Wildenhues" <address@hidden>
To: "Sebastien REYNES" <address@hidden>
Cc: <address@hidden>
Sent: Thursday, August 28, 2008 10:56 PM
Subject: Re: Automake with Pro*C


> Hello Sebastien,
>
> * Sebastien REYNES wrote on Tue, Aug 26, 2008 at 05:31:09PM CEST:
> >
> > Is it possible to use automake tool with Pro*C ?
>
> FWIW, I don't know Pro*C.  There is no special support for it in
> Automake.  That doesn't mean you can't use it, though.  There is
> some general information on using generated sources in the manual:
> <http://www.gnu.org/software/automake/manual/html_node/Sources.html>
>
<http://www.gnu.org/software/automake/manual/html_node/Support-for-Other-Lan
guages.html>
>
> > How can I edit the
> > Makefile.am to generate .c sources from .pc sources ?
>
> Likely in the same way you'd write a plain Makefile rule for doing this.
>
> PCCOMPILE = proc ...
> .pc.c:
>         $(PCCOMPILE) ... -o $@ $<
>
> > bin_PROGRAMS = myprog
> > myprog_SOURCES = myprog.c myprog.pc
> > my_prog_LDADD=$ORACLE_HOME/precomp/lib/libpgp.a    # library of the
precompilator pro*C
>
> > Do you know where could I find any example(s) using automake with
> > precompilation from Pro*C files ?
>
> No sorry.  You can probably find out in the Pro*C documentation how to
> invoke the precompiler.
>
> Hope that helps.
>
> Cheers,
> Ralf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]