summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1ea322b..f0511ae 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,20 @@
+DESTDIR=/
+
default:
- gcc -Wall -pedantic -g -Ilib -Isrc -I. -pthread $$(ncursesw6-config --cflags --libs) src/main.c -lcurl -lformw -lm -odiscord.c
-prepare:
- wget https://raw.githubusercontent.com/DaveGamble/cJSON/master/cJSON.c -O lib/cJSON.c
- wget https://raw.githubusercontent.com/DaveGamble/cJSON/master/cJSON.h -O lib/cJSON.h
+ gcc -Wall -pedantic -g -Isrc -I. -pthread $$(ncursesw6-config --cflags --libs) src/main.c -lcjson -lcurl -lformw -lm -odiscord.c
+
+install:
+ mkdir -p $(DESTDIR)/usr/bin/
+ cp discord.c $(DESTDIR)/usr/bin/
+
+distclean:
+ rm discord.c -f
+
clean:
- rm lib/cJSON.c lib/cJSON.h
+ rm discord.c -f
+
+prepare:
+ sudo apt install libncursesw6 libcurl4-openssl-dev libcjson-dev -y
+
valgrind:
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt --suppressions=/usr/lib/valgrind/ncurses.supp --suppressions=misc/openssl.supp ./discord.c