mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
20 lines
1.1 KiB
20 lines
1.1 KiB
CXX = clang++ |
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-misleading-indentation |
|
## NOTE: NEEDED_CXXFLAGS is here so that custom CXXFLAGS can be specified at build time |
|
## **without** overwriting the CXXFLAGS which we need in order to build. |
|
## For example, when adding 'hardening flags' to the build |
|
## (e.g. -fstack-protector-strong -Wformat -Werror=format-security), we do not want to remove |
|
## -std=c++11. If you want to remove this variable please do so in a way that allows setting |
|
## custom FLAGS to work at build-time. |
|
CXXVER := $(shell $(CXX) -dumpversion) |
|
ifneq ($(shell expr match $(CXX) 'clang'),5) |
|
NEEDED_CXXFLAGS = -std=c++11 |
|
else ifeq (${CXXVER}, "4.2.1") # older clang always returned 4.2.1 |
|
NEEDED_CXXFLAGS = -std=c++11 |
|
else # newer versions support C++17 |
|
NEEDED_CXXFLAGS = -std=c++17 |
|
endif |
|
DEFINES = -D_GLIBCXX_USE_NANOSLEEP=1 |
|
INCFLAGS = -I/usr/include/ -I/usr/local/include/ |
|
LDFLAGS = ${LD_DEBUG} -Wl,-rpath,/usr/local/lib -L/usr/local/lib |
|
LDLIBS = -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|
|
|