Added the ability to explicitly define compiler
This commit is contained in:
parent
f2a478ddab
commit
56e0318c6a
8
Makefile
8
Makefile
@ -33,6 +33,11 @@ else
|
|||||||
cleanCommand = rm $(buildFile)
|
cleanCommand = rm $(buildFile)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Explicitly set compiler to platform default if unset
|
||||||
|
ifeq ($(CXX),)
|
||||||
|
CXX = $(compiler)
|
||||||
|
endif
|
||||||
|
|
||||||
# Default target, compiles, executes and cleans
|
# Default target, compiles, executes and cleans
|
||||||
run: compile execute clean
|
run: compile execute clean
|
||||||
|
|
||||||
@ -60,12 +65,13 @@ lib: pull
|
|||||||
mkdir $(mkdirOptions) lib/$(platform)
|
mkdir $(mkdirOptions) lib/$(platform)
|
||||||
cp vendor/raylib-cpp/vendor/raylib/$(libGenDirectory)/libraylib.a lib/$(platform)/libraylib.a
|
cp vendor/raylib-cpp/vendor/raylib/$(libGenDirectory)/libraylib.a lib/$(platform)/libraylib.a
|
||||||
|
|
||||||
|
# Create the build folder
|
||||||
build:
|
build:
|
||||||
mkdir $(mkdirOptions) build
|
mkdir $(mkdirOptions) build
|
||||||
|
|
||||||
# Create the build folder and compile the executable
|
# Create the build folder and compile the executable
|
||||||
compile: build
|
compile: build
|
||||||
$(compiler) -std=c++17 -I include -L lib/$(platform) src/main.cpp -o $(buildFile) -l raylib $(options)
|
$(CXX) -std=c++17 -I include -L lib/$(platform) src/main.cpp -o $(buildFile) -l raylib $(options)
|
||||||
|
|
||||||
# Run the executable
|
# Run the executable
|
||||||
execute:
|
execute:
|
||||||
|
Loading…
Reference in New Issue
Block a user