Say I have a Makefile like this: CXX = g++ CXXFLAGS = -Wall -W -ansi -pedantic -g -c -o LDFLAGS = -o $(EXEC) EXEC = string_test OBJECTS = string.o string_test.o
all: $(OBJECTS) $(CXX) $^ $(LDFLAGS) %.o: %.cpp $(CXX) $(CXXFLAGS) $@ $< clean: rm -f $(OBJECTS) $(EXEC) *~ *.stackdump And now I want to add a new target and alter CXXFLAGS for that target (I want to add preprocessor define). How do I do that? I tried: pretranslate_method: $(OBJECTS) $(CXXFLAGS) = -Wall -W -ansi -pedantic -g -DUSE_PRETRANSLATE -c -o $(CXX) $^ $(LDFLAGS) but that didn't work.. Please help / E _______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils