summaryrefslogtreecommitdiffhomepage
path: root/examples/Makefile
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2017-07-21 09:49:23 +0200
committerraysan5 <[email protected]>2017-07-21 09:49:23 +0200
commit92729662f42f62156bcac3c1d21fbb57b7810b64 (patch)
treed7710898b6f914afcd417d2c320629dbd6b5d8ff /examples/Makefile
parent2679c4ae9b2fefdb0c150a7cd576d5d3297b027b (diff)
downloadraylib-92729662f42f62156bcac3c1d21fbb57b7810b64.tar.gz
raylib-92729662f42f62156bcac3c1d21fbb57b7810b64.zip
Additional path check
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 7d160852..8b4da2d5 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -30,11 +30,21 @@
# WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop()
PLATFORM ?= PLATFORM_DESKTOP
-# define raylib directory for include and library
-RAYLIB_PATH ?= C:\raylib\raylib
+# define default raylib path for include and library search
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+ ifeq ($(PLATFORM_OS),WINDOWS)
+ RAYLIB_PATH ?= C:\raylib\raylib
+ endif
+ ifeq ($(PLATFORM_OS),LINUX)
+ RAYLIB_PATH ?= ..
+ endif
+ ifeq ($(PLATFORM_OS),OSX)
+ RAYLIB_PATH ?= ..
+ endif
+endif
ifeq ($(PLATFORM),PLATFORM_RPI)
- RAYLIB_PATH = /home/pi/raylib
+ RAYLIB_PATH ?= /home/pi/raylib
endif
# define NO to use OpenAL Soft as static library (shared by default)