summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2021-01-29 21:34:44 +0100
committerRoland Reichwein <mail@reichwein.it>2021-01-29 21:34:44 +0100
commit358bd026e30479904c4721d0c84bde19ea31a013 (patch)
tree5f3f310143f6fbbd2cb89893a65c688d263b356d /Makefile
parentae0ccdf4569d6d4f49c60392a9e849aaa58c3fa6 (diff)
Support C++17
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6bc26a8..31af4e2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,19 @@
CXX=clang++-11
#CXX=g++-10
+STANDARD=c++17
+#STANDARD=c++20
+
CXXFLAGS=-O0 -g -D_DEBUG
#CXXFLAGS=-O2 -DNDEBUG
-CXXFLAGS+=-Wall -Iinclude -std=c++20
+CXXFLAGS+=-Wall -Iinclude -std=$(STANDARD)
ifeq ($(CXX),clang++-11)
+COMPILER_SUITE=clang
+endif
+
+ifeq ($(COMPILER_SUITE),clang)
CXXFLAGS+=-stdlib=libc++
endif
@@ -16,7 +23,7 @@ LDLIBS+=\
-lboost_timer \
-lboost_system \
-ifeq ($(CXX),clang++-11)
+ifeq ($(COMPILER_SUITE),clang)
LIBS+= \
-fuse-ld=lld-11 \
-lc++ \