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