CXX=clang++-14 #CXX=g++-12 ifeq ($(CXX),clang++-14) CXXTYPE=clang++ else ifeq ($(CXX),clang++) CXXTYPE=clang++ else CXXTYPE=g++ endif ifeq ($(shell which $(CXX)),) CXX=clang++-13 endif ifeq ($(shell which $(CXX)),) CXX=clang++-11 endif ifeq ($(shell which $(CXX)),) CXX=clang++-10 endif ifeq ($(shell which $(CXX)),) CXX=clang++ endif ifeq ($(shell which $(CXX)),) CXX=g++-9 endif ifeq ($(shell which $(CXX)),) CXX=g++ endif ifeq ($(CXXFLAGS),) CXXFLAGS=-g -O2 endif CXXFLAGS+=-Wall -fPIE -Wpedantic -gdwarf-4 LDFLAGS+=-pie ifeq ($(CXX),g++-9) CXXFLAGS+=-std=c++17 else CXXFLAGS+=-std=c++20 endif ifeq ($(CXX),clang++-10) LIBS+=-fuse-ld=lld-10 -lstdc++ else ifeq ($(CXX),clang++-11) #LIBS+=-fuse-ld=lld-11 -lc++ -lc++abi LLVMPROFDATA=llvm-profdata-11 LLVMCOV=llvm-cov-11 else ifeq ($(CXX),clang++-14) #LIBS+=-fuse-ld=lld-14 -lc++ -lc++abi LLVMPROFDATA=llvm-profdata-14 LLVMCOV=llvm-cov-14 else LIBS+=-lstdc++ -lstdc++fs endif CXXFLAGS+=$(shell pkg-config --cflags qrcodegencpp Magick++ fmt sqlite3) LIBS+=-lfcgi -lboost_filesystem -lpthread LIBS+=-lSQLiteCpp $(shell pkg-config --libs qrcodegencpp Magick++ fmt sqlite3) LIBS+=-lreichwein