Ajout d'un Makefile
This commit is contained in:
parent
52fa0c1789
commit
be83812716
|
@ -0,0 +1,34 @@
|
||||||
|
CC=gcc
|
||||||
|
FLAGS=-g -Wall -Wextra -Wpedantic
|
||||||
|
LFLAGS=
|
||||||
|
|
||||||
|
|
||||||
|
all: bin/main
|
||||||
|
|
||||||
|
OBJECTS = obj/main.o obj/structure.o obj/display.o obj/algorithm.o
|
||||||
|
bin/main: bin $(OBJECTS)
|
||||||
|
$(CC) -o $@ $(LFLAGS) $(FLAGS) $(OBJECTS)
|
||||||
|
|
||||||
|
obj/main.o: main.c obj
|
||||||
|
$(CC) -o $@ -c $(FLAGS) $<
|
||||||
|
|
||||||
|
obj/structure.o: structure.c structure.h obj
|
||||||
|
$(CC) -o $@ -c $(FLAGS) $<
|
||||||
|
|
||||||
|
obj/display.o: display.c display.h obj
|
||||||
|
$(CC) -o $@ -c $(FLAGS) $<
|
||||||
|
|
||||||
|
obj/algorithm.o: algorithm.c algorithm.h obj
|
||||||
|
$(CC) -o $@ -c $(FLAGS) $<
|
||||||
|
|
||||||
|
bin:
|
||||||
|
mkdir -p bin
|
||||||
|
|
||||||
|
obj:
|
||||||
|
mkdir -p obj
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf bin/ obj/
|
Loading…
Reference in New Issue