2015-12-28 15:52:02 +00:00
|
|
|
CXX = clang++
|
2018-06-28 23:27:19 +00:00
|
|
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-misleading-indentation
|
2024-08-28 19:12:29 +00:00
|
|
|
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 -lpthread -lboost_system -lboost_program_options
|
|
|
|
|
2014-12-17 20:46:19 +00:00
|
|
|
## 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.
|
2024-09-05 11:43:24 +00:00
|
|
|
CXXVER := $(shell $(CXX) -dumpversion|cut -c 1-2)
|
|
|
|
ifeq (${CXXVER}, "4.") # older clang always returned 4.2.1
|
2024-09-02 14:18:08 +00:00
|
|
|
$(error Compiler too old)
|
2024-09-05 11:43:24 +00:00
|
|
|
else ifeq (${CXXVER}, ${filter ${CXXVER},16 17 18 19}) # clang 16 - 19
|
2024-09-04 17:23:12 +00:00
|
|
|
NEEDED_CXXFLAGS = -std=c++20
|
2024-09-04 17:21:13 +00:00
|
|
|
else
|
2024-03-17 15:42:44 +00:00
|
|
|
NEEDED_CXXFLAGS = -std=c++17
|
2024-03-17 15:46:02 +00:00
|
|
|
endif
|
2024-09-04 17:23:12 +00:00
|
|
|
|