summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-11-21 20:11:12 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-11-21 20:11:12 +0100
commit8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb (patch)
tree27508c3ffa05f5934bd7af60c34736d89e0e5954 /makefile
parentinitial commit, UNTESTED bencoding parser (diff)
downloadtravnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.tar
travnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.tar.gz
travnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.tar.bz2
travnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.tar.lz
travnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.tar.xz
travnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.tar.zst
travnik-8e1cbd8f7bd5deb3310be4f4f65f7aa6ea9a9beb.zip
Diffstat (limited to '')
-rw-r--r--makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..5de5868
--- /dev/null
+++ b/makefile
@@ -0,0 +1,23 @@
+DESTDIR=/
+CC=cc
+
+default:
+ mkdir -p tmp
+ $(CC) -Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp $(CFLAGS) src/main.c -otravnik -lm $(LDFLAGS)
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin/
+ cp travnik $(DESTDIR)/usr/bin/
+
+distclean: clean
+
+clean:
+ rm -rf travnik tmp test-eval
+
+prepare:
+ sudo apt install libmicrohttpd-dev build-essential default-libmysqlclient-dev -y
+
+valgrind:
+ valgrind --error-exitcode=59 --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt $(CMD)
+
+.PHONY: default install distclean clean prepare valgrind