diff options
author | sijanec <anton@sijanec.eu> | 2021-04-01 23:30:37 +0200 |
---|---|---|
committer | sijanec <anton@sijanec.eu> | 2021-04-01 23:30:37 +0200 |
commit | 579048eaf89784ec1da8592d96311fafd49aea1a (patch) | |
tree | 61bf0c50c656f2b16ed8901ec3b07fb468ffb916 /Makefile | |
download | sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.tar sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.tar.gz sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.tar.bz2 sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.tar.lz sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.tar.xz sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.tar.zst sear.c-579048eaf89784ec1da8592d96311fafd49aea1a.zip |
Diffstat (limited to '')
-rw-r--r-- | Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a5f5a31 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +DESTDIR=/ + +default: + mkdir tmp -p + xxd -i < src/hp.html > tmp/hp.xxd + echo ', 0' >> tmp/hp.xxd + gcc -Wall -pedantic -g -Isrc -Itmp -pthread src/main.c $$(xml2-config --libs --cflags) -lmicrohttpd -osear.c + +install: + mkdir -p $(DESTDIR)/usr/bin/ + cp sear.c $(DESTDIR)/usr/bin/ + +distclean: + rm sear.c tmp -rf + +clean: + rm sear.c tmp -rf + +prepare: + sudo apt install libmicrohttpd-dev xxd build-essential libxml2-dev -y + +test-http: + mkdir -p tmp + gcc -Wall -pedantic -g -Isrc -Itmp test/nanohttp.c $$(xml2-config --libs --cflags) -otmp/nanohttp + +test-http-valgrind: + valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt tmp/nanohttp http://sijanec.eu/ |