%% "Adrian Ashley" <[EMAIL PROTECTED]> writes:
aa> Can anyone suggest a way to accomplish multiple pattern-specific variable
aa> assignments? This fragment illustrates what I'm trying to do.
aa> foo-%.o : CFLAGS += -DVARIANT=FOO
aa> bar-%.o : CFLAGS += -DVARIANT=BAR
aa> %-gcc.o : CFLAGS += -DGCC
aa> %-other.o : CFLAGS += -DOTHERCC
You could put one of these into a different variable, like:
%-gcc.o : CCTYPE = -DGCC
%-other.o : CCTYPE = -DOTHERCC
Then:
%-gcc.o: %.c
$(CC_GCC) $(CCTYPE) $(CFLAGS) -o $@ -c $<
%-other.o: %.c
$(CC_OTHER) $(CCTYPE) $(CFLAGS) -o $@ -c $<
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make