[build] DEPs build quietly now and aren't generated when making clean.

This commit is contained in:
Joe Thornber 2013-06-27 10:17:38 +01:00
parent 7cab21c8e7
commit 759263d388
2 changed files with 9 additions and 7 deletions

View File

@ -105,15 +105,13 @@ endif
.SUFFIXES: .d
%.d: %.cc
@echo " [DEP] $<"
$(CXX) -MM -MT $(subst .cc,.o,$<) $(INCLUDES) $(TEST_INCLUDES) $(CXXFLAGS) $< > $@.$$$$;\
sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $@ : Makefile ,g' < $@.$$$$ > $@; \
$(RM) $@.$$$$
%.o: %.cc
@echo " [CXX] $<"
$(V) $(CXX) -c $(INCLUDES) $(CXXFLAGS) -o $@ $<
@echo " [DEP] $<"
$(V) $(CXX) -MM -MT $(subst .cc,.o,$<) $(INCLUDES) $(TEST_INCLUDES) $(CXXFLAGS) $< > $*.$$$$; \
sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*; \
$(RM) $*.$$$$
#----------------------------------------------------------------

View File

@ -70,7 +70,11 @@ TEST_OBJECTS=$(subst .cc,.gmo,$(TEST_SOURCE))
%.gmo: %.cc
@echo " [CXX] $<"
$(CXX) -c $(INCLUDES) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) -o $@ $<
$(V) $(CXX) -c $(INCLUDES) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) -o $@ $<
@echo " [DEP] $<"
$(V) $(CXX) -MM -MT $(subst .cc,.o,$<) $(INCLUDES) $(GMOCK_INCLUDES) $(CXXFLAGS) $(GMOCK_FLAGS) $< > $*.$$$$; \
sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*; \
$(RM) $*.$$$$
unit-tests/unit_tests: $(TEST_OBJECTS) lib/libgmock.a lib/libpdata.a
@echo " [LD] $<"