Modular makefile

This commit is contained in:
Michael Chen
2017-12-27 00:57:22 +01:00
parent 1b53c9f862
commit f0fe616410
3 changed files with 13 additions and 4 deletions

View File

@ -1,5 +1,14 @@
libs = -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lSDL2_image -lSDL2_ttf
includes = -I"C:\SDL2\x32\include"
compiler = gcc
warningLevel = -Wall
sources = *.c
linker = -L"C:\SDL2\x32\lib"
target = Asteroids.exe
args = -o
all:
gcc -Wall -IC:\SDL2\x32\include *.c -LC:\SDL2\x32\lib -lmingw32 -lSDL2main -lSDL2 -lopengl32 -lSDL2_image -lSDL2_ttf -o Asteroids.exe
$(compiler) $(warningLevel) $(includes) $(sources) $(linker) $(libs) $(args) $(target)
run:
Asteroids.exe
$(target)