diff --git a/src/makefile.unix b/src/makefile.unix index 60617d6..744b505 100644 --- a/src/makefile.unix +++ b/src/makefile.unix @@ -6,7 +6,7 @@ USE_UPNP:=0 USE_IPV6:=1 LINK:=$(CXX) -ARCH:=$(system lscpu | head -n 1 | awk '{print $2}') +ARCH:=$(shell lscpu | head -n 1 | awk '{print $$2}') DEFS=-DBOOST_SPIRIT_THREADSAFE @@ -41,7 +41,6 @@ LIBS += \ -l boost_chrono$(BOOST_LIB_SUFFIX) \ -l db_cxx$(BDB_LIB_SUFFIX) \ -l ssl \ - -l event \ -l crypto ifndef USE_UPNP @@ -200,6 +199,12 @@ ifdef USE_ZMQ OBJS += obj/zmqpublishnotifier.o endif +obj: + @mkdir -p obj + +obj-test: + @mkdir -p obj-test + all: trianglesd test check: test_triangles FORCE @@ -231,14 +236,14 @@ obj/scrypt-x86_64.o: scrypt-x86_64.S obj/scrypt-arm.o: scrypt-arm.S $(CXX) -c $(xCXXFLAGS) -MMD -o $@ $< -obj/%.o: %.cpp +obj/%.o: %.cpp | obj $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -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) -obj/%.o: %.c +obj/%.o: %.c | obj $(CXX) -c $(xCXXFLAGS) -fpermissive -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ @@ -299,7 +304,7 @@ trianglesd: $(OBJS:obj/%=obj/%) TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) -obj-test/%.o: test/%.cpp +obj-test/%.o: test/%.cpp | obj-test $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< @cp $(@:%.o=%.d) $(@:%.o=%.P); \ sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \