summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b0831c6..a8baf36 100644
--- a/Makefile
+++ b/Makefile
@@ -3,12 +3,14 @@ CC = cc
.NOTPARALLEL:
default:
mkdir tmp -p
- -[ ! -f tmp/hp.css ] && wget -c https://sijanec.eu/assets/css/styles.css?ref=sear.c-make -Otmp/hp.css
- php src/hp.php > tmp/hp.html
+ sed "s/<!--ver-->/$$PVR/g" < src/hp.html > tmp/hp.html # gentoo ebuild. git overrides it.
+ -VER=`git describe --always` && sed "s/<!--ver-->/$$VER/g" < src/hp.html > tmp/hp.html
xxd -i < tmp/hp.html > tmp/hp.xxd
echo ', 0' >> tmp/hp.xxd
xxd -i < src/osdd.xml > tmp/osdd.xxd
echo ', 0' >> tmp/osdd.xxd
+ xxd -i < src/css.css > tmp/css.xxd
+ echo ', 0' >> tmp/css.xxd
$(CC) -Wall -Wextra -pedantic -Wno-unused-parameter -g -Isrc -Itmp -pthread src/main.c $$(xml2-config --libs --cflags) -lmicrohttpd -lm -osear.c
install:
@@ -33,3 +35,5 @@ test-http-valgrind:
valgrind:
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt ./sear.c
+
+.PHONY: valgrind test-http-valgrind test-http prepare clean distclean install default