Fix Makefile

This commit is contained in:
Valentin Moguérou 2024-04-16 01:24:32 +02:00
parent 43582273fd
commit 642caf7f2a
1 changed files with 13 additions and 14 deletions

View File

@ -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: