From a28ae3a6e7426a3bfc78ff35a7a5baf0013d169b Mon Sep 17 00:00:00 2001 From: Annwan Date: Sun, 31 May 2026 12:36:25 +0200 Subject: [PATCH] have makefile automatically create out/ if it doesn't exist --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 94df9ce..81c37f4 100644 --- a/Makefile +++ b/Makefile @@ -49,12 +49,14 @@ $(PROGRAM): $(OBJS) out/%.d: src/%.c + @mkdir -p $(@D) @set -e ; $(RM) $@; \ $(CC) -M $(CFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,out/\1.o $@ : ,g' < $@.$$$$ > $@; \ $(RM) $@.$$$$ out/%.o: src/%.c + @mkdir -p $(@D) $(CC) $(CFLAGS) -c $< -o $@ include $(DEPS)