summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 24 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e8a8f29..346f8a0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,38 +1,56 @@
PROJECTNAME=unicode
VERSION=$(shell dpkg-parsechangelog --show-field Version)
+ifeq ($(shell lsb_release -si),Debian)
+ONDEBIAN=yes
+else
+ONDEBIAN=no
+endif
-DISTROS=base debian11 ubuntu2110
+# On Ubuntu 2104 and 2110, dh_strip / debugedit is broken, therefore different Non-Debian options in the following
+DISTROS=base debian10 debian11 ubuntu2004 ubuntu2010 ubuntu2104 ubuntu2110 ubuntu2204
ifeq ($(wildcard $(shell which clang++-13)),)
+ifeq ($(wildcard $(shell which clang++-12)),)
+ifeq ($(wildcard $(shell which clang++-11)),)
ifeq ($(wildcard $(shell which clang++)),)
CXX=g++-11
else
CXX=clang++
endif
else
+CXX=clang++-11
+endif
+else
+CXX=clang++-12
+endif
+else
CXX=clang++-13
endif
-# boost is buggy for C++20: error: static_assert failed due to requirement 'detail::is_endian_reversible_inplace<char8_t>
-#STANDARD=c++17
-STANDARD=c++20
+STANDARD=c++17
ifeq ($(CXXFLAGS),)
#CXXFLAGS=-O0 -g -D_DEBUG
CXXFLAGS=-O2 -DNDEBUG
endif
-CXXFLAGS+=-Wall -Iinclude -std=$(STANDARD)
-
ifeq ($(CXX),clang++-13)
+ifeq ($(ONDEBIAN),yes)
COMPILER_SUITE=clang
LIBS+=-fuse-ld=lld-13
+# boost is buggy for C++20: error: static_assert failed due to requirement 'detail::is_endian_reversible_inplace<char8_t>
+STANDARD=c++20
+endif
endif
ifeq ($(CXX),clang++)
+ifeq ($(ONDEBIAN),yes)
COMPILER_SUITE=clang
LIBS+=-fuse-ld=lld
endif
+endif
+
+CXXFLAGS+=-Wall -Iinclude -std=$(STANDARD)
LDLIBS+=\
-lboost_context \