Edited makefile to run OS specific commands

This commit is contained in:
Aryeh 2020-11-19 16:01:18 +11:00
parent 00570f8dce
commit f504cd4b85

View File

@ -1,17 +1,28 @@
buildfile = ./build/app
# Variable definitions
macOSFrameworks = -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL
ifeq ($(OS), Windows_NT)
# Build for Windows:
# Not implemented yet
else
# Build for MacOS or Linux:
buildfile = ./build/app
initCommand = mkdir -p build
compileCommand = clang++ -std=c++17 $(macOSFrameworks) -I ./include/ ./lib/libraylib.a ./src/main.cpp -o $(buildfile)
cleanCommand = rm $(buildfile)
endif
all: init compile run clean
init:
mkdir -p build
$(initCommand)
compile:
clang++ -std=c++17 $(macOSFrameworks) -I ./include/ ./lib/libraylib.a ./src/main.cpp -o $(buildfile)
$(compileCommand)
run:
$(buildfile)
clean:
rm $(buildfile)
$(cleanCommand)