2015-12-28 18:52:02 +03:00
|
|
|
CXX = clang++
|
2018-06-29 02:27:19 +03:00
|
|
|
CXXFLAGS ?= ${CXX_DEBUG} -Wall -Wextra -Wno-unused-parameter -pedantic -Wno-misleading-indentation
|
2014-12-17 23:46:19 +03: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-03-17 18:42:44 +03:00
|
|
|
CXXVER := $(shell $(CXX) -dumpversion)
|
2024-03-17 18:49:14 +03:00
|
|
|
ifeq (${CXXVER}, "4.2.1") # older clang always returned 4.2.1
|
2024-03-17 18:42:44 +03:00
|
|
|
NEEDED_CXXFLAGS = -std=c++11
|
|
|
|
else # newer versions support C++17
|
|
|
|
NEEDED_CXXFLAGS = -std=c++17
|
2024-03-17 18:46:02 +03:00
|
|
|
endif
|
2023-02-26 23:38:23 +03:00
|
|
|
DEFINES = -D_GLIBCXX_USE_NANOSLEEP=1
|
2014-08-11 17:51:53 +04:00
|
|
|
INCFLAGS = -I/usr/include/ -I/usr/local/include/
|
2018-06-29 02:27:19 +03:00
|
|
|
LDFLAGS = ${LD_DEBUG} -Wl,-rpath,/usr/local/lib -L/usr/local/lib
|
2016-05-27 03:00:00 +03:00
|
|
|
LDLIBS = -lcrypto -lssl -lz -lboost_system -lboost_date_time -lboost_filesystem -lboost_program_options -lpthread
|