42 lines
502 B
Makefile
42 lines
502 B
Makefile
|
.PHONY: init, clean, mrproper
|
||
|
CC=g++
|
||
|
FLAGS=`pkg-config sdl2 --cflags --libs`
|
||
|
|
||
|
# 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
|