summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-07-09 23:00:24 +0200
committerGravatar Christian Hesse <mail@eworm.de>2013-07-09 23:00:24 +0200
commitb8255686c971a2d959e0f3b49df134b6492389a9 (patch)
tree868454562555c30a456fab0e8d8851c30f39bafe /Makefile
parentaf713f959f001391fd2a716ec347796015f1df4f (diff)
downloadcqrlogo-b8255686c971a2d959e0f3b49df134b6492389a9.tar.gz
cqrlogo-b8255686c971a2d959e0f3b49df134b6492389a9.tar.zst
add check0.2.1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8ea936a..b0cfca8 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,9 @@ CC := gcc
INSTALL := install
CP := cp
RM := rm
+ZBARIMG := zbarimg
+SED := sed
+GREP := grep
CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --cflags --libs libpng) \
$(shell pkg-config --cflags --libs zlib) \
@@ -16,8 +19,15 @@ all: cqrlogo.c config.h
config.h:
$(CP) config.def.h config.h
+
install:
$(INSTALL) -D -m0755 cqrlogo $(DESTDIR)/usr/share/webapps/cqrlogo/cqrlogo
+check:
+ SERVER_NAME=www.eworm.de HTTP_REFERER=http://www.eworm.de/ \
+ QUERY_STRING='scale=2&border=1' ./cqrlogo | $(SED) '1,2d' > \
+ check.png && $(ZBARIMG) --raw -q check.png | $(GREP) -e \
+ '^http://www.eworm.de/$$'
+
clean:
$(RM) -f *.o *~ cqrlogo