summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-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/