[Top][All Lists]

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

Fwd: Automake problem: one makefile for everything

From: Chapter33
Subject: Fwd: Automake problem: one makefile for everything
Date: Wed, 14 Dec 2005 12:28:57 EST

Not sure if my problem below is better addressed to the libtool mailing list.  Can anyone assist?
Many thanks,
--- Begin Message --- Subject: Automake problem: one makefile for everything Date: Wed, 14 Dec 2005 12:16:07 EST

I hope you can help me.  I'm banging my
head against the wall here doing something that I think should be
extremely simple, but just cannot get Automake/Autoconf/libtool to do
it the way I want it.

If I have the following files:


and I want a in the top-level source directory that
compiles main1.c and main2.c into one library (say and
mod1.c and mod2.c into in the modules directory.  Simple
request huh?  But in *one*  How do I do it?

This doesn't do the job:

lib_LTLIBRARIES = modules/
libmain_la_SOURCES = main1.c main2.c
libmod_la_SOURCES = modules/mod1.c modules/mod2.c

libtool doesn't like directory names in the lib_LTLIBRARIES variable.
But if I go ...


...then everything gets built in the top-level directory and I don't
want that.

Can anyone help?  My only work-around at present is to have a separate
Makefile in the modules sub-directory, but that won't work anymore
because I'm building a binary in the top-level Makefile that depends on
both earlier libraries, while libmod also depends on libmain, i.e.

binary -> depends on modules/ and
modules/ -> depends on

If I use separate Makefiles, I'm going to need three to get around the
dependencies and to get the build order right, and that's going to get

Please help!

Thanks in advance,


--- End Message ---

reply via email to

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