mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
* (2/3) cleanup : use $CXXFLAGS instead $NEEDED_FLAGS
This commit is contained in:
parent
4e94bc9efc
commit
d6ec412422
8
Makefile
8
Makefile
@ -24,16 +24,16 @@ obj:
|
|||||||
|
|
||||||
# weaker rule for building files without headers
|
# weaker rule for building files without headers
|
||||||
obj/%.o : %.cpp
|
obj/%.o : %.cpp
|
||||||
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -c -o $@ $<
|
$(CXX) $(CXXFLAGS) $(INCFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
obj/%.o : %.cpp %.h
|
obj/%.o : %.cpp %.h
|
||||||
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -c -o $@ $<
|
$(CXX) $(CXXFLAGS) $(INCFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC))
|
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC))
|
||||||
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) $(LIBS)
|
$(CXX) -o $@ $(LDLIBS) $(LDFLAGS) $(LIBS) $^
|
||||||
|
|
||||||
$(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
|
$(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC))
|
||||||
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) -shared -o $@ $^
|
$(CXX) -o $@ -shared $(CXXFLAGS) $(INCFLAGS) $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr obj $(I2PD) $(SHLIB)
|
rm -fr obj $(I2PD) $(SHLIB)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
CXX = g++
|
CXX = g++
|
||||||
CXXFLAGS = -O2
|
CXXFLAGS = -g -Wall -O2 -std=c++11
|
||||||
NEEDED_CXXFLAGS = -std=c++11
|
|
||||||
INCFLAGS = -I/usr/include/ -I/usr/local/include/
|
INCFLAGS = -I/usr/include/ -I/usr/local/include/
|
||||||
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
||||||
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread
|
||||||
|
@ -5,13 +5,13 @@ FGREP = fgrep
|
|||||||
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
|
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(FGREP) -c "64")
|
||||||
USE_AESNI := yes
|
USE_AESNI := yes
|
||||||
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
|
ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # >= 4.10
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
CXXFLAGS += -std=c++11
|
||||||
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
CXXFLAGS += -std=c++11
|
||||||
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
|
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
|
||||||
NEEDED_CXXFLAGS += -std=c++0x
|
CXXFLAGS += -std=c++0x
|
||||||
else ifeq ($(shell expr match $(CXX) 'clang'),5)
|
else ifeq ($(shell expr match $(CXX) 'clang'),5)
|
||||||
NEEDED_CXXFLAGS += -std=c++11
|
CXXFLAGS += -std=c++11
|
||||||
else # not supported
|
else # not supported
|
||||||
$(error Compiler too old)
|
$(error Compiler too old)
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user