Rename src/obj/test to src/obj-test to workaround bug in older GNU Make

This commit is contained in:
Luke Dashjr
2012-01-23 14:27:08 -05:00
parent d1e56838dc
commit 1677743fca
2 changed files with 7 additions and 5 deletions

View File

@@ -129,7 +129,7 @@ all: bitcoind
# auto-generated dependencies:
-include obj/nogui/*.P
-include obj/test/*.P
-include obj-test/*.P
obj/nogui/%.o: %.cpp
$(CXX) -c $(xCXXFLAGS) -MMD -o $@ $<
@@ -141,21 +141,21 @@ obj/nogui/%.o: %.cpp
bitcoind: $(OBJS:obj/%=obj/nogui/%)
$(CXX) $(xCXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
obj/test/%.o: test/%.cpp
obj-test/%.o: test/%.cpp
$(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -o $@ $<
@cp $(@:%.o=%.d) $(@:%.o=%.P); \
sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d)
test_bitcoin: obj/test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
test_bitcoin: obj-test/test_bitcoin.o $(filter-out obj/nogui/init.o,$(OBJS:obj/%=obj/nogui/%))
$(CXX) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ -Wl,-B$(LMODE) -lboost_unit_test_framework $(LDFLAGS) $(LIBS)
clean:
-rm -f bitcoind test_bitcoin
-rm -f obj/*.o
-rm -f obj/nogui/*.o
-rm -f obj/test/*.o
-rm -f obj-test/*.o
-rm -f obj/*.P
-rm -f obj/nogui/*.P
-rm -f obj/test/*.P
-rm -f obj-test/*.P

2
src/obj-test/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*
!.gitignore