summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/makefile b/makefile
index 59ee3d1..aba35cd 100644
--- a/makefile
+++ b/makefile
@@ -1,10 +1,17 @@
DESTDIR=/
CC=cc
+MYCFLAGS=-Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c
+MYLDFLAGS=-lresolv
default:
mkdir -p tmp
# -fsanitize-address
- $(CC) -Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c $(CFLAGS) src/main.c -otravnik -lm -lresolv $(LDFLAGS)
+ $(CC) $(MYCFLAGS) $(CFLAGS) src/main.c -otravnik $(MYLDFLAGS) $(LDFLAGS)
+
+utils:
+ $(CC) $(MYCFLAGS) $(CFLAGS) utils/midpoint.c -otmp/midpoint $(MYLDFLAGS) $(LDFLAGS)
+ $(CC) $(MYCFLAGS) $(CFLAGS) utils/bencoding.c -otmp/bencoding $(MYLDFLAGS) $(LDFLAGS)
+ $(CC) $(MYCFLAGS) $(CFLAGS) utils/dns.c -otmp/dns $(MYLDFLAGS) $(LDFLAGS)
install:
mkdir -p $(DESTDIR)/usr/bin/
@@ -21,4 +28,4 @@ prepare:
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
+.PHONY: default install distclean clean prepare valgrind utils