summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2022-12-30 15:07:39 +0100
committerRoland Reichwein <mail@reichwein.it>2022-12-30 15:07:39 +0100
commitaf1c4ee4d74ff7afc997372802d851d11daad418 (patch)
tree745761113c41ccbe6ea37119b51b609a219882c9 /Makefile
parent3f3d579c6a6f9a1a31278221f85b3194e3b6c5f4 (diff)
Added tests, added sqlite-backed storage (WIP!)
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile57
1 files changed, 7 insertions, 50 deletions
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