From 2f42619303627db401e469e2fd65123cd794a378 Mon Sep 17 00:00:00 2001
From: Roland Reichwein <mail@reichwein.it>
Date: Thu, 9 Apr 2020 11:38:48 +0200
Subject: Load only configured plugins, add plugins

---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
index 06385de..234ddaf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 DISTROS=debian10
 VERSION=$(shell dpkg-parsechangelog --show-field Version)
 PROJECTNAME=webserver
+PLUGINS=static-files webbox # weblog cgi fcgi
 
 CXX=clang++-10
 
@@ -77,6 +78,7 @@ TESTSRC=\
 SRC=$(PROGSRC) webserver.cpp
 
 all: $(PROJECTNAME) test-$(PROJECTNAME)
+	for i in $(PLUGINS) ; do make -C plugins/$$i ; done
 	./test-$(PROJECTNAME)
 	./webserver -c webserver.conf
 
@@ -127,7 +129,9 @@ debs: $(DISTROS)
 
 clean:
 	-rm -f test-$(PROJECTNAME) $(PROJECTNAME)
+	-rm -f plugins/*.so
 	-find . -name '*.o' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f
+	for i in $(PLUGINS) ; do make -C plugins/$$i clean ; done
 
 zip: clean
 	-rm -f ../$(PROJECTNAME).zip
-- 
cgit v1.2.3