From b8255686c971a2d959e0f3b49df134b6492389a9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 9 Jul 2013 23:00:24 +0200 Subject: add check --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') 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 -- cgit v1.2.3-70-g09d2