summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-01-08 23:48:11 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-01-08 23:48:11 +0100
commit9b3caf1f841cf451ba162bcaf83a96ba0c834a78 (patch)
tree1ea5adf151c03064c58f9e44fc72e8f87bfba16c /makefile
parentidea for metadl via tcp for outgoing connections implemented, not tested, compiles (diff)
downloadtravnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.tar
travnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.tar.gz
travnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.tar.bz2
travnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.tar.lz
travnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.tar.xz
travnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.tar.zst
travnik-9b3caf1f841cf451ba162bcaf83a96ba0c834a78.zip
Diffstat (limited to '')
-rw-r--r--makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/makefile b/makefile
index c513bbc..534a876 100644
--- a/makefile
+++ b/makefile
@@ -1,17 +1,16 @@
DESTDIR=/
CC=cc
-MYCFLAGS=-Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c
+MYCFLAGS=-Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c -fsanitize=address
MYLDFLAGS=-lresolv -lmd
default:
mkdir -p tmp
- # -fsanitize-address
$(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)
+utils: tmp/midpoint tmp/bencoding tmp/dns tmp/info
+
+tmp/%: utils/%.c src/dht.c
+ $(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS)
install:
mkdir -p $(DESTDIR)/usr/bin/