automake
[Top][All Lists]
Advanced

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

Re: Mostly similar library generation


From: Bruce Korb
Subject: Re: Mostly similar library generation
Date: Mon, 15 Apr 2002 08:52:52 -0700

Harlan Stenn wrote:

> I now have to build two libraries, libfoo.a and libfoosim.a, where the
> only difference between the two libraries is that bar.c is compiled
> "normally" for libfoo.a, but for libfoosim.a I need to also supply
> -DSIM when compiling bar.c .
> 
> As you might imagine, I'm doing this in an environment that must support
> de-ANSI-fication.
> 
> Ideas?

Use specific rules for building bar.c producing differently named
.o files.  LDADD the proper object for the proper library.
Reverse engineer the Makefile.in to discover the rules to use.
Something along the lines of:

  $(LTCOMPILE) -DSIM -c -o barsim.lo \
    `test -f 'bar.c' || echo '$(srcdir)/'`bar.c

-- 

Bruce Korb <first initial + last name at gnu dot org>
AG URL: http://autogen.sourceforge.net



reply via email to

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