Changed working directory of the run in Makefile

This commit is contained in:
Michael Chen
2018-01-09 14:36:57 +01:00
parent bcf1da4009
commit 89a745882e
2 changed files with 7 additions and 4 deletions

View File

@ -4,11 +4,13 @@ compiler = gcc
warningLevel = -Wall
sources = *.c
linker = -L".\lib"
target = bin\Breakout.exe
dir = bin
target = Breakout.exe
args = -o
all:
$(compiler) $(warningLevel) $(includes) $(sources) $(linker) $(libs) $(args) $(target)
$(compiler) $(warningLevel) $(includes) $(sources) $(linker) $(libs) $(args) $(dir)\$(target)
run:
$(target)
cd $(dir) && \
$(target)