summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-02-08 18:36:26 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-02-08 18:36:26 +0100
commit180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b (patch)
tree1959f7683768b9ec2850a1500ae9e0052cb8810d /makefile
downloadsoča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.tar
soča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.tar.gz
soča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.tar.bz2
soča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.tar.lz
soča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.tar.xz
soča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.tar.zst
soča-180f421bd2a5bab4c5d0d65ff151a5eaa7542a8b.zip
Diffstat (limited to 'makefile')
-rw-r--r--makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..c8fbebd
--- /dev/null
+++ b/makefile
@@ -0,0 +1,23 @@
+DESTDIR=/
+CC=cc
+MYCFLAGS=-O0 -Wall -Wextra -Wformat -pedantic -g -I. # -fsanitize=address
+MYLDFLAGS=
+
+default: ptt
+
+ptt: ptt.c
+ $(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS)
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin/
+ cp ptt $(DESTDIR)/usr/bin/
+
+distclean: clean
+
+clean:
+ rm -rf tmp
+
+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 valgrind