Merge branch 'main' into Windows
This commit is contained in:
commit
36d7cb1699
34
Makefile
34
Makefile
@ -9,11 +9,8 @@ ifeq ($(OS), Windows_NT)
|
|||||||
compiler = g++
|
compiler = g++
|
||||||
options = -pthread -lopengl32 -lgdi32 -lwinmm -mwindows
|
options = -pthread -lopengl32 -lgdi32 -lwinmm -mwindows
|
||||||
|
|
||||||
# Windows-specific syntax
|
|
||||||
THEN = &&
|
|
||||||
MAKE = mingw32-make
|
|
||||||
|
|
||||||
# Set Windows commands
|
# Set Windows commands
|
||||||
|
THEN = &&
|
||||||
cleanCommand = del build\app.exe
|
cleanCommand = del build\app.exe
|
||||||
else
|
else
|
||||||
# Check for MacOS/Linux
|
# Check for MacOS/Linux
|
||||||
@ -34,13 +31,7 @@ else
|
|||||||
|
|
||||||
# Set UNIX commands
|
# Set UNIX commands
|
||||||
mkdirOptions = -p
|
mkdirOptions = -p
|
||||||
MAKE = make
|
|
||||||
THEN = ;
|
THEN = ;
|
||||||
|
|
||||||
# Copy Directories for Unix/Linux
|
|
||||||
RaylibDirectory = vendor/raylib-cpp/vendor/raylib/src/raylib.h
|
|
||||||
|
|
||||||
|
|
||||||
cleanCommand = rm $(buildFile)
|
cleanCommand = rm $(buildFile)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -53,27 +44,20 @@ endif
|
|||||||
run: compile execute clean
|
run: compile execute clean
|
||||||
|
|
||||||
# Lists phony targets for Make compile
|
# Lists phony targets for Make compile
|
||||||
.PHONY: run setup pull compile execute clean
|
.PHONY: run setup submodules compile execute clean
|
||||||
|
|
||||||
# Sets up the project for compiling, creates libs and includes
|
# Sets up the project for compiling, creates libs and includes
|
||||||
setup: include lib
|
setup: include lib
|
||||||
|
|
||||||
# Pull and update the the build submodules
|
# Pull and update the the build submodules
|
||||||
pull:
|
submodules:
|
||||||
git submodule init $(THEN) git submodule update
|
git submodule update --init --recursive
|
||||||
cd vendor/raylib-cpp $(THEN) git submodule init $(THEN) git submodule update
|
|
||||||
|
|
||||||
# Copy the relevant header files into includes
|
# Copy the relevant header files into includes
|
||||||
include: pull
|
include: submodules
|
||||||
# Copy commands for Windows
|
# Copy commands for Windows
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(platform), Windows)
|
||||||
-mkdir $(mkdirOptions) .\include
|
-mkdir $(mkdirOptions) .\include
|
||||||
dir vendor
|
|
||||||
dir vendor\raylib-cpp
|
|
||||||
dir vendor\raylib-cpp\vendor
|
|
||||||
dir vendor\raylib-cpp\vendor\raylib
|
|
||||||
dir vendor\raylib-cpp\vendor\raylib\src
|
|
||||||
dir include
|
|
||||||
xcopy "vendor\raylib-cpp\vendor\raylib\src\raylib.h" /Y /f "include"
|
xcopy "vendor\raylib-cpp\vendor\raylib\src\raylib.h" /Y /f "include"
|
||||||
xcopy "vendor\raylib-cpp\vendor\raylib\src\raymath.h" /Y /f "include"
|
xcopy "vendor\raylib-cpp\vendor\raylib\src\raymath.h" /Y /f "include"
|
||||||
xcopy "vendor\raylib-cpp\include\*.hpp" /Y /f "include"
|
xcopy "vendor\raylib-cpp\include\*.hpp" /Y /f "include"
|
||||||
@ -86,9 +70,9 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Build the raylib static library file and copy it into lib
|
# Build the raylib static library file and copy it into lib
|
||||||
lib: pull
|
lib: submodules
|
||||||
cd vendor/raylib-cpp/vendor/raylib/src $(THEN) $(MAKE) PLATFORM=PLATFORM_DESKTOP
|
cd vendor/raylib-cpp/vendor/raylib/src $(THEN) $(MAKE) PLATFORM=PLATFORM_DESKTOP
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(platform), Windows)
|
||||||
-mkdir $(mkdirOptions) lib\$(platform)
|
-mkdir $(mkdirOptions) lib\$(platform)
|
||||||
xcopy "vendor\raylib-cpp\vendor\raylib\src\libraylib.a" /Y /f "lib\Windows\libraylib.a"
|
xcopy "vendor\raylib-cpp\vendor\raylib\src\libraylib.a" /Y /f "lib\Windows\libraylib.a"
|
||||||
else
|
else
|
||||||
@ -109,4 +93,4 @@ execute:
|
|||||||
|
|
||||||
# Clean up all relevant files
|
# Clean up all relevant files
|
||||||
clean:
|
clean:
|
||||||
$(cleanCommand)
|
$(cleanCommand)
|
Loading…
Reference in New Issue
Block a user