From d0db131a73933d0a6c65bab59d1e0e4f6a185338 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 6 Jun 2020 13:58:22 +0200 Subject: Code cleanup, use gcc 8 on debian 10 --- tests/Makefile | 57 +++++---------------------------------------------------- 1 file changed, 5 insertions(+), 52 deletions(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 2bccae4..2f0e809 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,35 +1,8 @@ -DISTROS=debian10 ubuntu1910 ubuntu2004 -PROJECTNAME=test-webserver - -CXX=clang++-10 - -ifeq ($(shell which $(CXX)),) -CXX=clang++ -endif - -ifeq ($(shell which $(CXX)),) -CXX=g++-9 -endif +include ../common.mk -ifeq ($(shell which $(CXX)),) -CXX=g++ -endif - -ifeq ($(CXXFLAGS),) -#CXXFLAGS=-O2 -DNDEBUG -CXXFLAGS=-O0 -g -D_DEBUG -endif -# -fprofile-instr-generate -fcoverage-mapping -# gcc:--coverage - -CXXFLAGS+= -Wall -I. -fPIE +PROJECTNAME=test-webserver -CXXFLAGS+= -pthread -ifeq ($(CXX),clang++-10) -CXXFLAGS+=-std=c++20 #-stdlib=libc++ -else -CXXFLAGS+=-std=c++17 -endif +CXXFLAGS+= -I. -fPIE CXXTESTFLAGS=-I../googletest/include -I../googlemock/include/ -I../googletest -I../googlemock @@ -44,25 +17,6 @@ LIBS=\ -lssl -lcrypto \ -ldl -#-lboost_coroutine \ -#-lboost_program_options \ -#-lboost_thread \ -#-lboost_regex \ - -ifeq ($(CXX),clang++-10) -LIBS+= \ --fuse-ld=lld-10 \ --lstdc++ -#-lc++ \ -#-lc++abi -#-lc++fs -#-lstdc++fs -else -LIBS+= \ --lstdc++ \ --lstdc++fs -endif - LDFLAGS+=-pie -L../libcommon TESTSRC=\ @@ -104,9 +58,8 @@ install: # misc --------------------------------------------------- clean: - -rm -f $(PROJECTNAME) - -find . -name '*.o' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f + -rm -f *.o *.a *.d $(PROJECTNAME) -.PHONY: clean all install all $(DISTROS) +.PHONY: clean all install -include $(wildcard $(TESTSRC:.cpp=.d)) -- cgit v1.2.3