From f7101248f706d48b2deaefd337c45a245589ea7d Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 20 Sep 2021 12:59:23 +0200 Subject: Makefile: default target changeable --- Makefile | 11 ++++++++--- 1 file 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 -- cgit v1.2.3