From 2ef9f51df48b14556e236d14213233e1bd7f829a Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 30 Jan 2021 19:20:15 +0100 Subject: Added Support for Debian and Ubuntu, add is_valid_utf() --- Makefile | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 46626e8..b66c17e 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,38 @@ PROJECTNAME=unicode VERSION=$(shell dpkg-parsechangelog --show-field Version) -DISTROS=base #debian10 +DISTROS=base debian10 ubuntu2004 ubuntu2010 +ifeq ($(wildcard $(shell which clang++-11)),) +ifeq ($(wildcard $(shell which clang++)),) +$(error No clang++-11 nor clang++ available!) +else +CXX=clang++ +endif +else CXX=clang++-11 # GCC is buggy: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282 #CXX=g++-10 +endif STANDARD=c++17 #STANDARD=c++20 +ifeq ($(CXXFLAGS),) CXXFLAGS=-O0 -g -D_DEBUG #CXXFLAGS=-O2 -DNDEBUG +endif CXXFLAGS+=-Wall -Iinclude -std=$(STANDARD) ifeq ($(CXX),clang++-11) COMPILER_SUITE=clang +LIBS+=-fuse-ld=lld-11 +endif + +ifeq ($(CXX),clang++) +COMPILER_SUITE=clang +LIBS+=-fuse-ld=lld endif ifeq ($(COMPILER_SUITE),clang) @@ -31,7 +47,6 @@ LDLIBS+=\ ifeq ($(COMPILER_SUITE),clang) LIBS+= \ --fuse-ld=lld-11 \ -lc++ \ -lc++abi #-lc++fs @@ -68,6 +83,7 @@ dep: $(SRC:.cpp=.d) clean: -rm -f src/recode src/test-unicode + -rm -rf result -find . -name '*.o' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f install: -- cgit v1.2.3