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
>[EMAIL PROTECTED]
>http://mail.gnu.org/mailman/listinfo/help-make



_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to