help-make
[Top][All Lists]
Advanced

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

Re: GMAKE and many differents CFLAGS


From: Chad Loder
Subject: Re: GMAKE and many differents CFLAGS
Date: Wed, 07 Mar 2001 06:50:39 -0800

Hi. GNU make allows you to define variables on a
per-target basis.

For example:

foo.c : MYVAR=myvalue
bar.c : MYVAR=yourvalue

foo.c :
        echo MYVAR is $(MYVAR)

bar.c :
        echo MYVAR is $(MYVAR)


Note that the per-target variable definitions are NOT
the target itself.

You can also specify more than one "component" of a target,
that is:

foo.c bar.c baz.c : MYVAR=myvalue
cons.c cdr.c : MYVAR=othervalue

This is all explained in the extensive GNU Make tutorial.

        c

At 12:58 PM 3/7/2001 +0100, you wrote:


Hello all,

does somebody know the common way to handle several different CFLAGS in the same makefile with gmake (OBJS1 -> CFLAGS1, OBJS2->CFLAGS2, etc ...) or do I split collections into subdirectories ?
Thank you for your help
jean-paul



_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make





reply via email to

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