Edited makefile to run OS specific commands
This commit is contained in:
parent
00570f8dce
commit
f504cd4b85
21
Makefile
21
Makefile
@ -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)
|
Loading…
Reference in New Issue
Block a user