From af1c4ee4d74ff7afc997372802d851d11daad418 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 30 Dec 2022 15:07:39 +0100 Subject: Added tests, added sqlite-backed storage (WIP!) --- Makefile | 57 +++++++-------------------------------------------------- 1 file changed, 7 insertions(+), 50 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5a1b1d2..a35cb9d 100755 --- a/Makefile +++ b/Makefile @@ -4,64 +4,17 @@ # Environment: Debian # +include common.mk + DISTROS=base debian11 ubuntu2204 VERSION=$(shell dpkg-parsechangelog --show-field Version) -CXX=clang++-13 - -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 - -LIBS=-lfcgi -lboost_filesystem INCLUDES=-I. -HEADERS=file.h config.h qrcode.h +HEADERS=file.h config.h qrcode.h storage.h SOURCES=$(HEADERS:.h=.cpp) OBJECTS=$(HEADERS:.h=.o) TARGETS=whiteboard.fcgi -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++ -#-lc++ \ -#-lc++abi -#-lc++fs -#-lstdc++fs -else -LIBS+= \ --lstdc++ \ --lstdc++fs -endif - -CXXFLAGS+=$(shell pkg-config --cflags qrcodegencpp Magick++ fmt) -LIBS+=$(shell pkg-config --libs qrcodegencpp Magick++ fmt) - build: $(TARGETS) all: build @@ -97,8 +50,12 @@ whiteboard.fcgi: $(OBJECTS) %.o: %.cpp $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ +test: + $(MAKE) -C tests + clean: -rm -f *.o *.fcgi + $(MAKE) -C tests clean deb: dpkg-buildpackage -- cgit v1.2.3