diff options
author | Christian Hesse <mail@eworm.de> | 2013-07-16 11:14:15 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-07-16 11:14:15 +0200 |
commit | 06474e536f1f2936234e61692f37e94e570c1667 (patch) | |
tree | 5fb229451c21ce36176b98413221b0ce8f0d2355 /Makefile | |
parent | e61cb69be065267df3b76930179d3f5bddec682f (diff) | |
download | cqrlogo-06474e536f1f2936234e61692f37e94e570c1667.tar.gz cqrlogo-06474e536f1f2936234e61692f37e94e570c1667.tar.zst |
clean up Makefile and generate documentation
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
@@ -1,6 +1,7 @@ # cqrlogo - CGI QR-Code logo for web services CC := gcc +MD := markdown INSTALL := install CP := cp RM := rm @@ -14,16 +15,28 @@ CFLAGS += $(shell pkg-config --cflags --libs libpng) \ $(shell pkg-config --cflags --libs libqrencode) VERSION = $(shell git describe --tags --long) -all: cqrlogo.c config.h +all: cqrlogo README.html cqrlogo.png + +cqrlogo: config.h $(CC) $(CFLAGS) -o cqrlogo cqrlogo.c \ -DVERSION="\"$(VERSION)\"" config.h: $(CP) config.def.h config.h -install: +README.html: + $(MD) README.md > README.html + +cqrlogo.png: cqrlogo + SERVER_NAME="github.com" HTTP_REFERER="https://github.com/eworm-de/cqrlogo" \ + QUERY_STRING='scale=4' \ + ./cqrlogo | $(SED) '1,/^$$/d' > cqrlogo.png + +install: cqrlogo README.html cqrlogo.png $(INSTALL) -D -m0755 cqrlogo $(DESTDIR)/usr/share/webapps/cqrlogo/cqrlogo $(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/cqrlogo/README.md + $(INSTALL) -D -m0644 README.html $(DESTDIR)/usr/share/doc/cqrlogo/README.html + $(INSTALL) -D -m0644 cqrlogo.png $(DESTDIR)/usr/share/doc/cqrlogo/cqrlogo.png check: $(eval SERVER := www.eworm.de) @@ -117,4 +130,4 @@ check: $(GREP) -e '^This QR Code has been stolen from https://eworm.net/!$$' clean: - $(RM) -f *.o *~ check.png cqrlogo + $(RM) -f *.o *~ *.png cqrlogo |