diff options
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)) |