From 642caf7f2a6a41aa7c7de2315eb0c2073a444b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Tue, 16 Apr 2024 01:24:32 +0200 Subject: [PATCH] Fix Makefile --- Makefile | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index b34f7b1..c85b808 100644 --- a/Makefile +++ b/Makefile @@ -9,31 +9,30 @@ test: bin/main bin/main MP2I-creneaux.txt 33 MP2I-colleurs.txt 16 6 15 output.csv OBJECTS = obj/structure.o obj/algorithm.o obj/display.o obj/logger.o obj/main.o -bin/main: bin $(OBJECTS) +bin/main: $(OBJECTS) + @mkdir -p bin $(CC) -o $@ $(LFLAGS) $(FLAGS) $(OBJECTS) - -obj/main.o: src/main.c obj + +obj/main.o: src/main.c + @mkdir -p obj $(CC) -o $@ -c $(FLAGS) $< -obj/structure.o: src/structure.c src/structure.h obj +obj/structure.o: src/structure.c src/structure.h + @mkdir -p obj $(CC) -o $@ -c $(FLAGS) $< -obj/display.o: src/display.c src/display.h obj +obj/display.o: src/display.c src/display.h + @mkdir -p obj $(CC) -o $@ -c $(FLAGS) $< -obj/algorithm.o: src/algorithm.c src/algorithm.h obj +obj/algorithm.o: src/algorithm.c src/algorithm.h + @mkdir -p obj $(CC) -o $@ -c $(FLAGS) $< -obj/logger.o: src/logger.c src/logger.h obj +obj/logger.o: src/logger.c src/logger.h + @mkdir -p obj $(CC) -o $@ -c $(FLAGS) $< -bin: - mkdir -p bin - -obj: - mkdir -p obj - - .PHONY: clean clean: