summaryrefslogtreecommitdiffhomepage
path: root/examples/Makefile
diff options
context:
space:
mode:
authorBenjamin Summerton <[email protected]>2017-07-21 19:30:24 -0400
committerGitHub <[email protected]>2017-07-21 19:30:24 -0400
commitc43caeccb635ab2b23992f8cc0d144056f15e797 (patch)
tree27a3d0ea584676b7c6f05e40c6625d46d5a18357 /examples/Makefile
parentc6cd07c373541f3b112e99f924b2213196625dc7 (diff)
downloadraylib-c43caeccb635ab2b23992f8cc0d144056f15e797.tar.gz
raylib-c43caeccb635ab2b23992f8cc0d144056f15e797.zip
Update Makefile in `examples/`
We need to grab the OS name before determining what the path should be.
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile40
1 files changed, 20 insertions, 20 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 8b4da2d5..c5938d36 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -30,6 +30,26 @@
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
PLATFORM ?= PLATFORM_DESKTOP
+# determine PLATFORM_OS in case PLATFORM_DESKTOP selected
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+ # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows
+ ifeq ($(OS),Windows_NT)
+ PLATFORM_OS=WINDOWS
+ LIBPATH=win32
+ else
+ UNAMEOS:=$(shell uname)
+ ifeq ($(UNAMEOS),Linux)
+ PLATFORM_OS=LINUX
+ LIBPATH=linux
+ else
+ ifeq ($(UNAMEOS),Darwin)
+ PLATFORM_OS=OSX
+ LIBPATH=osx
+ endif
+ endif
+ endif
+endif
+
# define default raylib path for include and library search
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS)
@@ -54,26 +74,6 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
SHARED_OPENAL = NO
endif
-# determine PLATFORM_OS in case PLATFORM_DESKTOP selected
-ifeq ($(PLATFORM),PLATFORM_DESKTOP)
- # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows
- ifeq ($(OS),Windows_NT)
- PLATFORM_OS=WINDOWS
- LIBPATH=win32
- else
- UNAMEOS:=$(shell uname)
- ifeq ($(UNAMEOS),Linux)
- PLATFORM_OS=LINUX
- LIBPATH=linux
- else
- ifeq ($(UNAMEOS),Darwin)
- PLATFORM_OS=OSX
- LIBPATH=osx
- endif
- endif
- endif
-endif
-
# define compiler: gcc for C program, define as g++ for C++
ifeq ($(PLATFORM),PLATFORM_WEB)
# define emscripten compiler