This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
non-recursive make & CPPFLAGS
- From: Ralf Corsepius <corsepiu at faw dot uni-ulm dot de>
- To: Automake List <automake at gnu dot org>
- Date: Fri, 28 Nov 2003 04:56:58 +0100
- Subject: non-recursive make & CPPFLAGS
- Organization: FAW Ulm
Hi,
Give a Makefile.am similar to this:
lib_LIBRARIES = libfoo.a
libfoo_a_SOURCES = foo/foo.c
libfoo_a_CPPFLAGS = -DFOO
lib_LIBRARIES += libbar.a
libbar_a_SOURCES = bar/bar.c
libbar_a_CPPFLAGS = -DBAR
Such Makefile.ams typically can be met when converting a recursive
sourcetree into a non-recursive.
Passing *_CPPFLAGS however causes automake to prepend the its "mangled
name" to *.o's (libfoo_a-foo.o), though they are not required.
IIRC, the rationale for introducing the "mangling" was to avoid
conflicts when compiling a single source multiple times with different
CPPFLAGS/CFLAGS flags.
This doesn't apply to the example above, were the sources are completely
separate.
Question: Is there a way to switch off this "mangling" rsp. is there a
way to set up CPPFLAGS/CFLAGS such that this "mangling" doesn't occur?
Ralf