Separated platforms in Makefile
This commit is contained in:
parent
6fa0959ac6
commit
f2d4a606c3
17
Makefile
17
Makefile
@ -8,10 +8,6 @@ ifeq ($(OS), Windows_NT)
|
|||||||
platform = Windows
|
platform = Windows
|
||||||
compiler = g++
|
compiler = g++
|
||||||
options = -pthread -lopengl32 -lgdi32 -lwinmm -mwindows
|
options = -pthread -lopengl32 -lgdi32 -lwinmm -mwindows
|
||||||
|
|
||||||
# Set Windows commands
|
|
||||||
THEN = &&
|
|
||||||
cleanCommand = del ${CURDIR}\build\*.exe
|
|
||||||
else
|
else
|
||||||
# Check for MacOS/Linux
|
# Check for MacOS/Linux
|
||||||
UNAMEOS = $(shell uname)
|
UNAMEOS = $(shell uname)
|
||||||
@ -28,10 +24,6 @@ else
|
|||||||
compiler = clang++
|
compiler = clang++
|
||||||
options = -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL
|
options = -framework CoreVideo -framework IOKit -framework Cocoa -framework GLUT -framework OpenGL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set UNIX commands
|
|
||||||
THEN = ;
|
|
||||||
cleanCommand = rm $(buildFile)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Explicitly set compiler to platform default if unset
|
# Explicitly set compiler to platform default if unset
|
||||||
@ -68,11 +60,12 @@ endif
|
|||||||
|
|
||||||
# Build the raylib static library file and copy it into lib
|
# Build the raylib static library file and copy it into lib
|
||||||
lib: submodules
|
lib: submodules
|
||||||
cd vendor/raylib-cpp/vendor/raylib/src $(THEN) $(MAKE) PLATFORM=PLATFORM_DESKTOP
|
|
||||||
ifeq ($(platform), Windows)
|
ifeq ($(platform), Windows)
|
||||||
|
cd vendor/raylib-cpp/vendor/raylib/src && $(MAKE) PLATFORM=PLATFORM_DESKTOP
|
||||||
-mkdir lib\$(platform)
|
-mkdir lib\$(platform)
|
||||||
-robocopy "vendor\raylib-cpp\vendor\raylib\src" "lib\Windows" libraylib.a
|
-robocopy "vendor\raylib-cpp\vendor\raylib\src" "lib\Windows" libraylib.a
|
||||||
else
|
else
|
||||||
|
cd vendor/raylib-cpp/vendor/raylib/src; $(MAKE) PLATFORM=PLATFORM_DESKTOP
|
||||||
mkdir -p lib/$(platform)
|
mkdir -p 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
|
||||||
endif
|
endif
|
||||||
@ -96,4 +89,8 @@ execute:
|
|||||||
|
|
||||||
# Clean up all relevant files
|
# Clean up all relevant files
|
||||||
clean:
|
clean:
|
||||||
$(cleanCommand)
|
ifeq ($(platform), Windows)
|
||||||
|
del "${CURDIR}\build\*.exe"
|
||||||
|
else
|
||||||
|
rm $(buildFile)
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user