This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Conditional modules and libraries.
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: Bill Moseley <moseley at hank dot org>
- Cc: automake at gnu dot org
- Date: Thu, 27 Mar 2003 23:49:06 +0100
- Subject: Re: Conditional modules and libraries.
- References: <Pine.LNX.4.10.10303261510100.12383-100000@mardy.hank.org>
>>> "Bill" == Bill Moseley <moseley at hank dot org> writes:
[...]
Bill> noinst_LTLIBRARIES = libswishindex.la
Bill> libswishindex_la_LIBADD = sw_expat/libswexpat.la $(LIBXML2_OBJS)
Bill> libswishindex_la_LDFLAGS = $(LIBXML2_LIB)
Bill> libswishindex_la_CPPFLAGS = $(LIBXML2_CFLAGS)
Bill> libswishindex_la_DEPENDENCIES = $(LIBXML2_OBJS)
You should also have sw_expat/libswexpat.la in _DEPENDENCIES.
Maybe it's easier to say
libswishindex_la_DEPENDENCIES = $(libswishindex_la_LIBADD)
Bill> EXTRA_libswishindex_la_SOURCES = parser.c parser.h
Bill> libswishindex_la_SOURCES = \
Bill> fs.c fs.h \
Bill> It's building the sources correctly with the
Bill> -I/usr/include/libxml2/... so the
Bill> libswishindex_la_CPPFLAGS is working:
Bill> gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include/libxml2/libxml
Bill> -I/usr/include/libxml2 -g -O2 -c docprop_write.c
Bill> -Wp,-MD,.deps/libswishindex_la-docprop_write.TPlo -o
Bill> libswishindex_la-docprop_write.o >/dev/null 2>&1
Bill> mv -f .libs/libswishindex_la-docprop_write.lo
Bill> libswishindex_la-docprop_write.lo
Watch out how the object is named. Objects compiled with
per-target flags are always prefixed this way (so you can
compile the same source with different flags without conflicts).
Bill> But then when it builds the $(LIBXML2_OBJS) the flags are
Bill> missing - which is the only time I really need them! ;).
LIBXML2_OBJS should be set to libswishindex_la-parser.lo, not parser.lo.
parser.lo is compiled with the default flags; libswishindex_la-parser.lo is
compiled with libswishindex.la's flags.
[...]
--
Alexandre Duret-Lutz