aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 0cb1cbc..208f55e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,14 @@
-dns_example: dns_example.c dns.c dns.h
- gcc dns_example.c dns.c -I. -o $@
+DEBUG ?= yes
+
+CFLAGS = -xc -ansi -Wall
+ifeq '$(DEBUG)' 'yes'
+CFLAGS += -g -O0
+else
+CFLAGS += -O3
+endif
+
+dns_example: dns_example.c dns.c
+ gcc $(CFLAGS) $^ -I. -o $@
.PHONY: clean
clean: