aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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