diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-04-03 12:39:00 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-04-03 12:39:00 +0200 |
commit | e60bb89a6d1392c0007a1fbc03faf007faf76167 (patch) | |
tree | 05820683872664bf644a41f8b34f18173f11b6db /Makefile | |
parent | f27702d3cf183f7fbaf88e584bae63a6514d9e65 (diff) |
Added Debian systemd service file
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 27 insertions, 3 deletions
@@ -1,7 +1,16 @@ +DISTROS=debian10 +VERSION=$(shell dpkg-parsechangelog --show-field Version) PROJECTNAME=webserver CXX=clang++-10 -#CXX=g++-9 + +ifeq ($(shell which $(CXX)),) +CXX=clang++ +endif + +ifeq ($(shell which $(CXX)),) +CXX=g++-9 +endif ifeq ($(CXXFLAGS),) #CXXFLAGS=-O2 -DNDEBUG @@ -47,7 +56,8 @@ LIBS+= \ endif PROGSRC=\ - http.cpp + http.cpp \ + http_debian10.cpp TESTSRC=\ test-webserver.cpp \ @@ -87,6 +97,18 @@ install: cp webserver $(DESTDIR)/usr/bin # misc --------------------------------------------------- +deb: + # build binary deb package + dpkg-buildpackage -us -uc -rfakeroot + +deb-src: + dpkg-source -b . + +$(DISTROS): deb-src + sudo pbuilder build --basetgz /var/cache/pbuilder/$@.tgz --buildresult result/$@ ../webserver_$(VERSION).dsc ; \ + +debs: $(DISTROS) + clean: -rm -f test-$(PROJECTNAME) $(PROJECTNAME) -find . -name '*.o' -o -name '*.d' -o -name '*.gcno' -o -name '*.gcda' | xargs rm -f @@ -96,6 +118,8 @@ zip: clean zip -r ../$(PROJECTNAME).zip * ls -l ../$(PROJECTNAME).zip -.PHONY: clean all zip + + +.PHONY: clean all zip install deb deb-src debs all $(DISTROS) -include $(wildcard $(SRC:.cpp=.d)) |