From 092c3cc12a7092032c77ecfb75b7c6baec1da3cb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 30 Apr 2020 16:35:44 +0200 Subject: Debian packaging --- Makefile | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 87 insertions(+), 7 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 4f0e435..02cb17c 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ endif # -fprofile-instr-generate -fcoverage-mapping # gcc:--coverage -CXXFLAGS+= -Wall -I. -DVERSION=\"$(VERSION)\" +CXXFLAGS+= -Wall -I. -DVERSION=\"$(VERSION)\" -fPIE CXXFLAGS+= -pthread ifeq ($(CXX),clang++-10) @@ -64,6 +64,8 @@ LIBS+= \ -lstdc++fs endif +LDFLAGS+=-pie + PROGSRC=\ auth.cpp \ base64.cpp \ @@ -95,10 +97,10 @@ all: build # testsuite ---------------------------------------------- test-$(PROJECTNAME): $(TESTSRC:.cpp=.o) - $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@ + $(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@ $(PROJECTNAME): $(SRC:.cpp=.o) - $(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@ + $(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@ dep: $(TESTSRC:.cpp=.d) @@ -148,10 +150,88 @@ clean: -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 - zip -r ../$(PROJECTNAME).zip * - ls -l ../$(PROJECTNAME).zip +DISTFILES= \ + archive.h \ + auth.cpp \ + auth.h \ + base64.cpp \ + base64.h \ + config.cpp \ + config.h \ + file.cpp \ + file.h \ + http.cpp \ + http.h \ + https.cpp \ + https.h \ + os.cpp \ + os.h \ + plugin.cpp \ + plugin.h \ + plugin_interface.h \ + privileges.cpp \ + privileges.h \ + response.cpp \ + response.h \ + server.cpp \ + server.h \ + statistics.cpp \ + statistics.h \ + test-webserver.cpp \ + webserver.cpp \ + webserver.1 \ + README.txt \ + LICENSE.txt \ + Makefile \ + googletest \ + googlemock \ + debian/changelog \ + debian/compat \ + debian/control \ + debian/copyright \ + debian/README.Debian \ + debian/rules \ + debian/source/format \ + debian/webserver.conf \ + debian/webserver.dirs \ + debian/webserver.docs \ + debian/webserver.install \ + debian/webserver.service \ + plugins/cgi/cgi.h \ + plugins/cgi/Makefile \ + plugins/cgi/cgi.cpp \ + plugins/webbox/file.h \ + plugins/webbox/file.cpp \ + plugins/webbox/stringutil.cpp \ + plugins/webbox/stringutil.h \ + plugins/webbox/webbox.h \ + plugins/webbox/html/refresh-inverted.png \ + plugins/webbox/html/directory.png \ + plugins/webbox/html/file.png \ + plugins/webbox/html/menu.png \ + plugins/webbox/html/webbox.css \ + plugins/webbox/html/favicon.ico \ + plugins/webbox/html/index.html \ + plugins/webbox/html/webbox.js \ + plugins/webbox/Makefile \ + plugins/webbox/webbox.cpp \ + plugins/weblog/weblog.h \ + plugins/weblog/procmail/procmailrc \ + plugins/weblog/procmail/procmail.sh \ + plugins/weblog/stringutil.h \ + plugins/weblog/stringutil.cpp \ + plugins/weblog/Makefile \ + plugins/weblog/weblog.cpp \ + plugins/static-files/static-files.h \ + plugins/static-files/static-files.cpp \ + plugins/static-files/Makefile \ + plugins/statistics/statistics.h \ + plugins/statistics/Makefile \ + plugins/statistics/statistics.cpp + +dist: clean + tar cfJ ../$(PROJECTNAME)-$(VERSION).tar.xz $(DISTFILES) + ls -l ../$(PROJECTNAME)-$(VERSION).tar.xz .PHONY: clean all zip install deb deb-src debs all $(DISTROS) -- cgit v1.2.3