From 9dc97269201603dd479e15a736a64479a5095556 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 19 Dec 2021 19:51:38 +0100 Subject: Simplify utf_iterator for input, build on Debian 10+11, Ubuntu 2004-2204 --- Makefile | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'Makefile') 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 -#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 +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 \ -- cgit v1.2.3