automake
[Top][All Lists]
Advanced

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

Re: problem with noinst_LIBRARIES ...


From: Roberto Alejandro Espí Muñoz
Subject: Re: problem with noinst_LIBRARIES ...
Date: Mon, 24 Sep 2007 10:42:02 -0400

Ok, sorry about that, I tried to simplify the example.  I really use much
more directories

elements =    \
     main.cpp

bin_PROGRAMS = programABC
programABC_SOURCES =         \
    $(elements)
programABC_LDADD = ./directoryA/libdirA.a
./directoryB/libdirB.a./directoryC/libdirC.a
AM_CXXFLAGS = <compile flags for main >
AM_LDFLAGS = <link flags for main >

SUBDIRS = ./directoryA ./directoryB ./directoryC

This is how it should go ...

On 9/24/07, Ralf Corsepius <address@hidden> wrote:
>
> On Mon, 2007-09-24 at 10:09 -0400, Roberto Alejandro Espí Muñoz wrote:
> > I tried using the example shown on the reference document of automake
> > pertaining the use of per source compiling flags.  For it I tried the
> > noinst_LIBRARIES for creating .a files enclosing my compiled object
> files
> > ".o" .  For example :
> >
> > This is my source tree:
> >
> > Makefile.am
> > directoryA/Makefile.am
> > directoryB/Makefile.am
> > directoryC/Makefile.am
> >
> > directoryA/Makefile.am:
> >
> > elements = class1.cpp class2.cpp class3.cpp
> >
> > noinst_LIBRARIES = libdirA.a
> > libdirA_a_SOURCES =     \
> >    $(elements)
> >
> > AM_CXXFLAGS = <compile flags for dirA>
> > AM_LDFLAGS = <link flags for dirA>
> >
> > directoryB/Makefile.am:
> >
> > elements = class1.cpp class2.cpp class3.cpp
> >
> > noinst_LIBRARIES = libdirB.a
> > libdirB_a_SOURCES =     \
> >    $(elements)
> >
> > AM_CXXFLAGS = <compile flags for dirB>
> > AM_LDFLAGS = <link flags for dirB>
> >
> > Same thing for directoryC/Makefile.am
> >
> > In my root Makefile.am:
> >
> > elements =    \
> >     src/main.cpp
> >
> > bin_PROGRAMS = programABC
> > programABC_SOURCES =         \
> >     $(elements)
> > programABC_LDADD = ./src/directoryA/libdirA.a ./src/directoryB/libdirB.a
> > ./src/directoryC/libdirC.a
> >
> > AM_CXXFLAGS = <compile flags for main >
> > AM_LDFLAGS = <link flags for main >
> >
> > SUBDIRS = ./src/directoryA ./src/directoryB ./src/directoryC
> >
> > My project is already autoreconf(ed), automake(d) and
> ./configure(d).  When
> > I issue make I get dependency errors when I link the whole program.  Can
> > anybody tell me if the makefile directives are wrong??
> Well, your toplevel Makefile.am above accesses files under ./src/, while
> the layout you describe doesn't have "src" - Typos or the cause of your
> issues?
>
> Ralf
>
>
>
>
>


-- 
teratux


reply via email to

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