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: