aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWojciech Kosior <kwojtus@protonmail.com>2020-05-08 00:01:23 +0200
committerWojciech Kosior <kwojtus@protonmail.com>2020-05-08 00:01:23 +0200
commitf91c8395cec54efb8908e4cc9dd261983cca639b (patch)
treecead9add643875dfcf7a631df7436a393b677ecb /Makefile
parent79447dfd0de73e9159576d5f493404f586eff80b (diff)
download0tdns-f91c8395cec54efb8908e4cc9dd261983cca639b.tar.gz
0tdns-f91c8395cec54efb8908e4cc9dd261983cca639b.zip
join querying and responding in one program
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 4 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 30a9d27..ccd3186 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,21 @@
CC ?= gcc
CFLAGS = -std=c99 -Wall -Werror -I include
-0tDNS : build/0tDNS.o
- $(CC) $^ -lunbound -o $@
-
-build/0tDNS.o : src/0tDNS.c | build
- gcc $(CFLAGS) $^ -c -o $@
+0tDNS : build/0tDNS.o build/receive_respond.o
+ $(CC) $^ -lunbound -lldns -o $@
-receive_respond : build/receive_respond.o
- $(CC) $^ -lldns -o $@
-
-build/receive_respond.o : src/receive_respond.c | build
+build/%.o : src/%.c | build
gcc $(CFLAGS) $^ -c -o $@
ask_localhost : build/ask_localhost.o
$(CC) $^ -lunbound -o $@
-build/ask_localhost.o : src/ask_localhost.c | build
- gcc $(CFLAGS) $^ -c -o $@
-
build :
mkdir build
all : 0tDNS receive_respond
clean :
- -rm -r build 0tDNS receive_respond ask_localhost
+ -rm -r build 0tDNS ask_localhost
.PHONY : clean