2016-03-10 23:00:26 +00:00
|
|
|
.PHONY: init, clean, mrproper
|
|
|
|
CC=g++
|
2016-03-11 00:12:03 +00:00
|
|
|
FLAGS=-pthread -std=c++11 `pkg-config sdl2 --cflags --libs` -l SDL2_image
|
2016-03-10 23:00:26 +00:00
|
|
|
|
|
|
|
# INIT > STRUCTURE DE FICHIERS POUR LES EXECUTABLES
|
|
|
|
init: clean
|
|
|
|
mkdir dep.o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# EXECUTABLE > DEPENDANCES DE L'EXECUTABLE
|
|
|
|
all: init main.o clean
|
|
|
|
rm -r dep.o
|
|
|
|
$(CC) main.o -o exe $(FLAGS)
|
|
|
|
|
|
|
|
# AMORCE > PROGRAMME PRINCIPAL
|
|
|
|
main.o: main.cpp
|
|
|
|
$(CC) -c $< -o main.o $(FLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# RESET > SUPPRESSION DES FICHIERS
|
|
|
|
clean:
|
|
|
|
touch init.o
|
|
|
|
rm -r *.o
|
|
|
|
|
|
|
|
# RESET FOR REBUILD > SUPPRESSION DE L'EXECUTABLE
|
|
|
|
mrproper:
|
|
|
|
rm exe
|