42 lines
536 B
Makefile
42 lines
536 B
Makefile
.PHONY: init, clean, mrproper
|
|
CC=g++
|
|
FLAGS=-pthread -std=c++11 `pkg-config sdl2 --cflags --libs` -l SDL2_image
|
|
|
|
# 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
|