summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2020-05-10 18:18:37 +0200
committerRoland Reichwein <mail@reichwein.it>2020-05-10 18:18:37 +0200
commit6c1cc0b2c854dd56dcb6238816a6ce2cb493c71c (patch)
treede041dfb3bc12a04fa4defdbd286d098f34adddc /Makefile
parent5b32a4415c9776dd6cae859c8d718b5e68f01d81 (diff)
Separated out lib
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2e3f006..b9fb155 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,8 @@ LIBS=\
-lcrypt \
-lpthread \
-lssl -lcrypto \
--ldl
+-ldl \
+-lcommon
#-lboost_coroutine \
#-lboost_program_options \
@@ -71,7 +72,7 @@ LIBS+= \
-lstdc++fs
endif
-LDFLAGS+=-pie
+LDFLAGS+=-pie -Llibcommon
PROGSRC=\
auth.cpp \
@@ -106,9 +107,12 @@ all: build
test-$(PROJECTNAME): $(TESTSRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@
-$(PROJECTNAME): $(SRC:.cpp=.o)
+$(PROJECTNAME): libcommon/libcommon.a $(SRC:.cpp=.o)
$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@
+libcommon/libcommon.a:
+ $(MAKE) -C libcommon
+
dep: $(TESTSRC:.cpp=.d)
%.d: %.cpp
@@ -157,6 +161,7 @@ clean:
-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
+ $(MAKE) -C libcommon clean
DISTFILES= \
archive.h \
@@ -206,6 +211,9 @@ DISTFILES= \
debian/webserver.install \
debian/webserver.manpages \
debian/webserver.service \
+ libcommon/Makefile \
+ libcommon/mime.h \
+ libcommon/mime.cpp \
plugins/cgi/cgi.h \
plugins/cgi/Makefile \
plugins/cgi/cgi.cpp \