From 6eb1ecf3619f00071eadb6080e15f381f197b298 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 28 Feb 2021 09:55:22 +0100 Subject: Makefile update --- common.mk | 12 ++++++++---- plugins/static-files/Makefile | 2 +- plugins/statistics/Makefile | 2 +- plugins/webbox/Makefile | 2 +- plugins/weblog/Makefile | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/common.mk b/common.mk index a7ee20c..746d1a6 100644 --- a/common.mk +++ b/common.mk @@ -1,5 +1,5 @@ CXX=g++-10 -#CXX=clang++-10 +#CXX=clang++-11 ifeq ($(shell which $(CXX)),) CXX=g++-8 @@ -21,6 +21,10 @@ ifeq ($(shell which $(CXX)),) CXX=g++ endif +ifeq ($(LINK_STATICALLY),1) +LDFLAGS+=-static +endif + ifeq ($(CXXFLAGS),) #CXXFLAGS=-O2 -g -DNDEBUG CXXFLAGS=-O0 -g -D_DEBUG @@ -31,15 +35,15 @@ endif CXXFLAGS+=-Wall -I. CXXFLAGS+=-pthread -ifeq ($(CXX),clang++-10) +ifeq ($(CXX),clang++-11) CXXFLAGS+=-std=c++20 #-stdlib=libc++ else CXXFLAGS+=-std=c++17 endif -ifeq ($(CXX),clang++-10) +ifeq ($(CXX),clang++-11) LIBS+= \ --fuse-ld=lld-10 \ +-fuse-ld=lld-11 \ -lstdc++ #-lc++ \ #-lc++abi diff --git a/plugins/static-files/Makefile b/plugins/static-files/Makefile index f4cfb31..7c817fb 100644 --- a/plugins/static-files/Makefile +++ b/plugins/static-files/Makefile @@ -19,7 +19,7 @@ LDLIBS=\ -lssl -lcrypto \ -ldl -LDFLAGS=-L../../libcommon +LDFLAGS+=-L../../libcommon PROGSRC=\ static-files.cpp diff --git a/plugins/statistics/Makefile b/plugins/statistics/Makefile index 34c0229..26032c3 100644 --- a/plugins/statistics/Makefile +++ b/plugins/statistics/Makefile @@ -19,7 +19,7 @@ LDLIBS=\ -lssl -lcrypto \ -ldl -LDFLAGS=-L../../libcommon +LDFLAGS+=-L../../libcommon PROGSRC=\ statistics.cpp diff --git a/plugins/webbox/Makefile b/plugins/webbox/Makefile index 39a2c8c..4be08d1 100644 --- a/plugins/webbox/Makefile +++ b/plugins/webbox/Makefile @@ -19,7 +19,7 @@ LDLIBS=\ -lssl -lcrypto \ -ldl -LDFLAGS=-L../../libcommon +LDFLAGS+=-L../../libcommon PROGSRC=\ webbox.cpp diff --git a/plugins/weblog/Makefile b/plugins/weblog/Makefile index ca62ce8..6cec97a 100644 --- a/plugins/weblog/Makefile +++ b/plugins/weblog/Makefile @@ -19,7 +19,7 @@ LDLIBS=\ -lssl -lcrypto \ -ldl -LDFLAGS=-L../../libcommon +LDFLAGS+=-L../../libcommon PROGSRC=\ weblog.cpp -- cgit v1.2.3