summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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