diff --git a/Makefile b/Makefile index 26c53e6..c7facab 100644 --- a/Makefile +++ b/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) \ No newline at end of file + $(cleanCommand) \ No newline at end of file