Correct makefile deps and improve output

This commit is contained in:
simon.kagstrom 2010-01-25 09:59:26 +00:00
parent a71a5b1870
commit b888a9b6a5

View File

@ -56,22 +56,23 @@ clean:
deps/%.d: %.cpp deps/%.d: %.cpp
@echo makedep $(notdir $<) @echo makedep $(notdir $<)
@install -d deps/$(dir $<) @install -d deps/$(dir $<)
@$(CPP) -M $(DEFINES) $(CFLAGS) -o $@ $< @$(CPP) -M -MT objs-host/$(patsubst %.cpp,%.o,$<) $(DEFINES) $(CFLAGS) -o $@ $<
deps/%.d: %.c deps/%.d: %.c
@echo makedep $(notdir $<) @echo makedep $(notdir $<)
@install -d deps/$(dir $<) @install -d deps/$(dir $<)
@$(CPP) -M $(DEFINES) $(CFLAGS) -o $@ $< @$(CPP) -M -MT objs-host/$(patsubst %.c,%.o,$<) $(DEFINES) $(CFLAGS) -o $@ $<
objs-host/%.o: %.cpp objs-host/%.o: %.cpp
@echo $(notdir $<) @echo CXX $(notdir $<)
@install -d objs-host/$(dir $<) @install -d objs-host/$(dir $<)
@$(CXX) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER) @$(CXX) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
objs-host/%.o: %.c objs-host/%.o: %.c
@echo $(notdir $<) @echo CC $(notdir $<)
@install -d objs-host/$(dir $<) @install -d objs-host/$(dir $<)
@$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER) @$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< $(ERROR_FILTER)
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $+ @echo LD $@
@$(LD) $(LDFLAGS) -o $@ $+