build: tools: also declutter sourcecode

This commit is contained in:
René van Dorst
2025-09-27 16:52:50 +02:00
parent 2676dbd0d6
commit 373d723d47
2 changed files with 12 additions and 8 deletions
+9 -5
View File
@@ -1,16 +1,20 @@
CC = gcc
CCFLAGS = -Wall -o
BUILDDIR = output/
all: injector fileadder httpd_sim
all: create_build_dir $(BUILDDIR)injector $(BUILDDIR)fileadder $(BUILDDIR)httpd_sim
create_build_dir:
mkdir -p $(BUILDDIR)
clean:
rm *.o
rm -r $(BUILDDIR)
injector: injector.c
$(BUILDDIR)injector: injector.c
gcc $^ $(CCFLAGS) $@
fileadder: fileadder.c
$(BUILDDIR)fileadder: fileadder.c
gcc $^ $(CCFLAGS) $@
httpd_sim: httpd_sim.c httpd_sim.h
$(BUILDDIR)httpd_sim: httpd_sim.c httpd_sim.h
gcc $< $(CCFLAGS) $@ -I/usr/include/json-c -ljson-c