automake
[Top][All Lists]
Advanced

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

Re: Building two binaries from a similar set of sources.


From: Tom Tromey
Subject: Re: Building two binaries from a similar set of sources.
Date: 13 May 2001 09:00:32 -0600

>>>>> "David" == David Kirkby <address@hidden> writes:

David> The difference I'm trying to overcome, is that when building
David> rect_in_rect, RECT_IN_RECT should be defined. Whereas when
David> building circ_in_circ, then instead of RECT_IN_RECT being
David> defined, CIRC_IN_CIRC would be defined instead.

If you are using automake 1.4 then you are in for a lot of work.  You
have to arrange, by hand, for each file to be compiled two different
ways.  You might want to think about restructuring your program so
that you don't have conditional compilation in every module.  For
instance you could isolate all the dependent parts into a single file.
That would make it easier.

With the cvs automake you can just define:

    rect_in_rect_CFLAGS = -DRECT_IN_RECT
    circ_in_circ_CFLAGS = -DCIRC_IN_CIRC

If your sources are already mostly shared, then use a library.  You
want to do this no matter what automake you use, because it will make
compilations faster.

Tom



reply via email to

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