Any idea why something like this wouldnt work in makefile ?
all : $(GOAL_DB) $(GOAL)
%.d: %.cpp
$(CC) $(CPPFLAGS_DB) $< > $@
%.o : %.cpp
$(CC) $(FLAGS_DB) $< -o $@
$(GOAL_DB) : $(OFILES)
$(CC) $(LFLAGS_DB) -o $@ $^ $(LIBS_DB)
strip $(GOAL_DB)
rm -f *.o *.d
%.d: %.cpp
$(CC) $(CPPFLAGS) $< > $@
%.o : %.cpp
$(CC) $(FLAGS) $< -o $@
$(GOAL) : $(OFILES)
$(CC) $(LFLAGS) -o $@ $^ $(LIBS)
strip $(GOAL)
rm -f *.o *.d
I'm just trying to build two different targets using make all , GNU make.
The first target builds fine , but it not creating new objects files for another target.