automake
[Top][All Lists]
Advanced

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

Multiple Targets with autotools


From: Bartov, Asaf
Subject: Multiple Targets with autotools
Date: Wed, 30 Aug 2006 19:04:49 +0300

Hello,

I need some expert advice on the GNU toolchain.

I have a large project that I'm trying to convert to use the GNU
autotools.  One requirement of the project is that each binary unit
(several shared libraries, several static libraries, and one executable)
be built in several configurations (some are Apache modules, so I want
module X to be built once for Apache 2.0, once for Apache 2.2, etc., and
I want each to have debug and release flavors, so at least four targets
per binary unit).

How do I express this in Automake?

Here's a sample Makefile.am of mine:

========================================================
INCLUDES = -I../include
-I/h/abartov/3rdp_c/XmlSoft/libxml2/2.6.10/include
-I/h/abartov/3rdp_c/apache/APR/0.9.12/linux-x86/include 
AM_CFLAGS =  -D_DEBUG -D_LIB 
lib_LIBRARIES = liburlpat.a
liburlpat_a_SOURCES = trie.c urlpat.c

========================================================

This creates only one target, of course, in the current (source)
directory.  How do I design the Makefile.am to provide for four binary
targets, each in a directory of its own, so that I'd end up having:

.../urlpat/Makefile.am
.../urlpat/src/Makefile.am
.../urlpat/src/trie.c
.../urlpat/src/urlpat.c
.../urlpat/_Debug_Apache2.0/liburlpat.a
.../urlpat/_Debug_Apache2.2/liburlpat.a
etc.

Many thanks in advance,

        Asaf





reply via email to

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