summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-04-16 19:50:39 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2022-04-16 19:50:39 +0200
commitf80e4bda5263e3428537ecb7d49b18ffd3c0e4ce (patch)
tree7efe9596fa165b80841f6cebe75cb04e17c53f5a /Makefile
parentv tretje gre rado (diff)
downloadsear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.tar
sear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.tar.gz
sear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.tar.bz2
sear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.tar.lz
sear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.tar.xz
sear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.tar.zst
sear.c-c8a9dddd021535aacd97202432bf56c26a0ed616.zip
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