diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-20 20:45:49 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-20 20:45:49 +0200 |
commit | 84a8b4a50ca97d59d5cf62d61e3f067ceb777cc0 (patch) | |
tree | c7c2fc6fb566135767abac3667d4cb188a78c89a | |
parent | e8ea6ded735011ab2858e9d5e99d64fb32c72382 (diff) | |
download | dns-84a8b4a50ca97d59d5cf62d61e3f067ceb777cc0.tar.gz |
Makefile styling
-rw-r--r-- | Makefile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -35,17 +35,18 @@ DEFAULT = debug default: $(DEFAULT) build: dir $(OBJ) - @echo [LD] $(OBJ) + @echo [ LD ] $(OBJ) @$(CC) $(CFLAGS) -o $(BUILDDIR)/$(OUTPUT) $(OBJ) $(LDFLAGS) debug: CFLAGS += -g -D_DEBUG debug: build; build_test: dir $(TOBJS) $(TSUBS) - @echo [LD] $(TOBJS) $(TSUBS) + @echo [ LD ] $(TOBJS) $(TSUBS) @$(CC) $(TESTCFLAGS) -o $(TESTDIR)/run $(TOBJS) $(TSUBS) $(TESTLDFLAGS) test: build_test + @echo [EXEC] $(TESTDIR)/run @$(TESTDIR)/run valgrind_test: build_test @@ -65,7 +66,7 @@ dir: @mkdir -p $(BUILDDIR) $(OBJECTDIR)/%.o: $(SOURCEDIR)/%.c - @echo [CC] $< + @echo [ CC ] $< @$(CC) $(CFLAGS) -c $< -o $@ $(TESTDIR)/%.o: $(TESTDIR)/%.c @@ -75,12 +76,13 @@ $(TESTDIR)/%.o: $(TESTDIR)/%.c #sudo setcap 'cap_net_bind_service=+ep' /path/to/prog #to allow port access run: $(DEFAULT) + @echo [EXEC] $(BUILDDIR)/$(OUTPUT) $(RUNARGS) $(BUILDDIR)/$(OUTPUT) $(RUNARGS) .PHONY: clean clean: - @echo [RM] $(OBJ) $(TOBJS) - @echo [RM] $(BUILDDIR)/$(OUTPUT) $(TESTDIR)/run + @echo [ RM ] $(OBJ) $(TOBJS) + @echo [ RM ] $(BUILDDIR)/$(OUTPUT) $(TESTDIR)/run @rm -df $(OBJ) $(TOBJS) $(TESTDIR)/run @rm -Rdf $(BUILDDIR) $(OBJECTDIR) @rm -f {$(SOURCEDIR),$(TESTDIR)}/*.gc{da,no} |