aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-20 12:59:23 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-20 12:59:23 +0200
commitf7101248f706d48b2deaefd337c45a245589ea7d (patch)
tree2b45b55c36d5f7632acc651fcc4a5dc9491cc718
parent966dcd15e37f66f6a52d3ef41da2a8f9cc1806a9 (diff)
downloaddns-f7101248f706d48b2deaefd337c45a245589ea7d.tar.gz
Makefile: default target changeable
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2926f51..d1165f8 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,12 @@ TESTS = $(wildcard $(TESTDIR)/*.c)
TOBJS = $(TESTS:.c=.o)
TSUBS = $(filter-out $(OBJECTDIR)/main.o,$(OBJ))
-RUNARGS = -p 5333
+RUNARGS = -p 5333 -z tests/zone.file
+
+# default build target
+DEFAULT = debug
+
+default: $(DEFAULT)
build: dir $(OBJ)
@echo [LD] $(OBJ)
@@ -69,7 +74,7 @@ $(TESTDIR)/%.o: $(TESTDIR)/%.c
#sudo setcap 'cap_net_bind_service=+ep' /path/to/prog
#to allow port access
-run: build
+run: $(DEFAULT)
$(BUILDDIR)/$(OUTPUT) $(RUNARGS)
.PHONY: clean
@@ -83,7 +88,7 @@ clean:
@rm -f coverage.html
.PHONY: all
-all: clean build
+all: clean $(DEFAULT)
devsetup:
@echo "[" > compile_commands.json