From fe429b07f6878cf39c6945868a4199b8404b8e7d Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sat, 13 Jul 2024 18:07:17 +0200 Subject: Makefile, true --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..03de33b --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +CC := gcc +CFLAGS := -Wall -Wextra -std=c11 -O2 +LDFLAGS := + +SOURCES := $(wildcard src/*.c) +HEADERS := $(wildcard src/*.h) +TARGETS := $(patsubst src/%.c,bin/%,$(SOURCES)) + +.PHONY: all clean + +all: $(TARGETS) + +clean: + rm -f $(TARGETS) + +$(TARGETS): bin/%: src/%.c $(HEADERS) + @mkdir -p $(dir $@) + $(CC) $(CFLAGS) -o $@ $< -- cgit v1.2.3-70-g09d2