From 3a30c00dae254ffc8a32ab4945388a9e0f878b8f Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Tue, 13 Jan 2015 12:55:14 +0300 Subject: [PATCH 1/2] Fix: mkdir exist in multi thread building --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 87a55fdb..d256c36e 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ endif all: mk_build_dir $(SHLIB) $(I2PD) mk_build_dir: - test -d obj || mkdir obj + mkdir -p obj api: $(SHLIB) @@ -37,12 +37,12 @@ api: $(SHLIB) ## custom FLAGS to work at build-time. deps: - @test -d obj || mkdir obj + @mkdir -p obj $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) -MM *.cpp > $(DEPS) @sed -i -e '/\.o:/ s/^/obj\//' $(DEPS) obj/%.o : %.cpp - @test -d obj || mkdir obj + @mkdir -p obj $(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< # '-' is 'ignore if missing' on first run From 214eb0caa5b3f5694d168dbde679eb44cd7fef3a Mon Sep 17 00:00:00 2001 From: Timofey Titovets Date: Tue, 13 Jan 2015 15:14:52 +0300 Subject: [PATCH 2/2] Not overwrite -fPIC with CXXFLAGS --- Makefile.linux | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.linux b/Makefile.linux index 100d6b6a..62445902 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -1,4 +1,4 @@ -CXXFLAGS = -g -Wall -fPIC +CXXFLAGS = -g -Wall INCFLAGS = ## NOTE: The NEEDED_CXXFLAGS are here so that custom CXXFLAGS can be specified at build time @@ -22,6 +22,8 @@ else # not supported $(error Compiler too old) endif +NEEDED_CXXFLAGS += -fPIC + ifeq ($(USE_STATIC),yes) LIBDIR := /usr/lib LDLIBS = $(LIBDIR)/libboost_system.a