summaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-02-27 00:14:33 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2023-02-27 00:14:33 +0100
commit07e8a1deaa45098e302e5bd85d1528c5c5992233 (patch)
treea61c78e27c8ee12718edd41dfa3f6506b8e5b983 /makefile
parentflask je prepočasen => src/metainfo.c (diff)
downloadtravnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.tar
travnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.tar.gz
travnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.tar.bz2
travnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.tar.lz
travnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.tar.xz
travnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.tar.zst
travnik-07e8a1deaa45098e302e5bd85d1528c5c5992233.zip
Diffstat (limited to 'makefile')
-rw-r--r--makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/makefile b/makefile
index f32985e..bc6b7f9 100644
--- a/makefile
+++ b/makefile
@@ -3,7 +3,7 @@ CC=cc
MYCFLAGS=-DHARDCODED_DNS=`(host ipv6.sijanec.eu || echo no_host_program_on_build_host) | tail -n1 | rev | cut -d\ -f1 | rev` -O0 -Wall -Wextra -Wformat -pedantic -g -Isrc -Itmp -Itiny-AES-c # -fsanitize=address
MYLDFLAGS=-lresolv -lmd
-default: travnik utils
+default: travnik metainfo.o metainfo utils
tmp:
mkdir -p tmp
@@ -11,9 +11,12 @@ tmp:
travnik: src/main.c
$(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS)
-db: src/db.c
+metainfo: src/metainfo.c
$(CC) $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS)
+metainfo.o: src/metainfo.c
+ $(CC) -fPIC $(MYCFLAGS) $(CFLAGS) $< -o$@ $(MYLDFLAGS) $(LDFLAGS)
+
utils: tmp/midpoint tmp/bencoding tmp/dns tmp/info
tmp/%: utils/%.c src/dht.c tmp