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