summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 18 insertions, 2 deletions
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: