summaryrefslogtreecommitdiffhomepage
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk21
1 files changed, 20 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index 746d1a6..0a874b8 100644
--- a/common.mk
+++ b/common.mk
@@ -1,5 +1,16 @@
+CXX=clang++-13
+
+ifeq ($(shell which $(CXX)),)
+CXX=clang++-11
+endif
+
+ifeq ($(shell which $(CXX)),)
+CXX=g++-11
+endif
+
+ifeq ($(shell which $(CXX)),)
CXX=g++-10
-#CXX=clang++-11
+endif
ifeq ($(shell which $(CXX)),)
CXX=g++-8
@@ -37,6 +48,10 @@ CXXFLAGS+=-Wall -I.
CXXFLAGS+=-pthread
ifeq ($(CXX),clang++-11)
CXXFLAGS+=-std=c++20 #-stdlib=libc++
+else ifeq ($(CXX),clang++-13)
+CXXFLAGS+=-std=c++2b #-stdlib=libc++
+else ifeq ($(CXX),g++-11)
+CXXFLAGS+=-std=c++20 #-stdlib=libc++
else
CXXFLAGS+=-std=c++17
endif
@@ -49,6 +64,10 @@ LIBS+= \
#-lc++abi
#-lc++fs
#-lstdc++fs
+else ifeq ($(CXX),clang++-13)
+LIBS+= \
+-fuse-ld=lld-13 \
+-lstdc++
else
LIBS+= \
-lstdc++ \