Cleaned up directory creation command usage per-platform
This commit is contained in:
parent
0ec85ea512
commit
55ee7c1728
9
Makefile
9
Makefile
@ -9,7 +9,6 @@ ifeq ($(OS), Windows_NT)
|
|||||||
options = -pthread -lopengl32 -lgdi32 -lwinmm -mwindows
|
options = -pthread -lopengl32 -lgdi32 -lwinmm -mwindows
|
||||||
|
|
||||||
# Set Windows commands
|
# Set Windows commands
|
||||||
mkdirCommand = -mkdir
|
|
||||||
cleanCommand = del build\app.exe
|
cleanCommand = del build\app.exe
|
||||||
else
|
else
|
||||||
# Check for MacOS/Linux
|
# Check for MacOS/Linux
|
||||||
@ -28,8 +27,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Set UNIX commands
|
# Set UNIX commands
|
||||||
mkdirCommand = mkdir -p
|
|
||||||
cleanCommand = rm $(buildFile)
|
cleanCommand = rm $(buildFile)
|
||||||
|
mkdirOptions = -p
|
||||||
endif
|
endif
|
||||||
|
|
||||||
run: compile execute clean
|
run: compile execute clean
|
||||||
@ -43,17 +42,17 @@ pull:
|
|||||||
cd vendor/raylib-cpp; git submodule init ; git submodule update
|
cd vendor/raylib-cpp; git submodule init ; git submodule update
|
||||||
|
|
||||||
include: pull
|
include: pull
|
||||||
$(mkdirCommand) include
|
mkdir $(mkdirOptions) include
|
||||||
cp vendor/raylib-cpp/vendor/raylib/src/{raylib.h,raymath.h} include
|
cp vendor/raylib-cpp/vendor/raylib/src/{raylib.h,raymath.h} include
|
||||||
cp vendor/raylib-cpp/include/*.hpp include
|
cp vendor/raylib-cpp/include/*.hpp include
|
||||||
|
|
||||||
lib: pull
|
lib: pull
|
||||||
cd vendor/raylib-cpp/vendor/raylib/src; make PLATFORM=PLATFORM_DESKTOP
|
cd vendor/raylib-cpp/vendor/raylib/src; make PLATFORM=PLATFORM_DESKTOP
|
||||||
$(mkdirCommand) lib/$(platform)
|
mkdir $(mkdirOptions) lib/$(platform)
|
||||||
cp vendor/raylib-cpp/vendor/raylib/src/libraylib.a lib/macOS/libraylib.a
|
cp vendor/raylib-cpp/vendor/raylib/src/libraylib.a lib/macOS/libraylib.a
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
$(mkdirCommand) build
|
mkdir $(mkdirOptions) build
|
||||||
$(compiler) -std=c++17 -I include -L lib/$(platform) src/main.cpp -o $(buildFile) -l raylib $(options)
|
$(compiler) -std=c++17 -I include -L lib/$(platform) src/main.cpp -o $(buildFile) -l raylib $(options)
|
||||||
|
|
||||||
execute:
|
execute:
|
||||||
|
Loading…
Reference in New Issue
Block a user