automake
[Top][All Lists]
Advanced

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

how to compile same source multiple times?


From: David Mosberger-Tang
Subject: how to compile same source multiple times?
Date: Sat, 23 Feb 2002 11:04:27 -0800

Perhaps this is a FAQ, but I can't seem to find the answer anywhere:
What's the proper way of telling automake that the same source file
needs to be compiled multiple times with different options.

For example, I have a file called foo.c and I'd like to compile it
once with the normal options and once with -DBAR defined.  The
resulting two objects would have to go into the same library (foo.c
will define different global symbols depending on whether or not BAR
is defined).

I supposed I could have autoconf generate a stub source file
foo-BAR.c which contains:

        #define BAR
        #include "foo.c"

and then have configure expand these files into _LDADD variable, but
I'm unsure whether this is the best way of making this work.

Suggestions?

Thanks,

        --david



reply via email to

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