diff options
| author | Ray <[email protected]> | 2017-08-25 01:53:15 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-08-25 01:53:15 +0200 |
| commit | c074783861994fb9f3bcc618b776a41dc57b50d0 (patch) | |
| tree | 63fdca2144cd13f6a537e76d6a3f8712ae106ead /examples/Makefile | |
| parent | 910b4b5d53d9a904070807de5e8a66edadd939e3 (diff) | |
| parent | 0fc1323c80c2501c36741c05fd771ac1d001d049 (diff) | |
| download | raylib-c074783861994fb9f3bcc618b776a41dc57b50d0.tar.gz raylib-c074783861994fb9f3bcc618b776a41dc57b50d0.zip | |
Merge pull request #346 from raysan5/develop
Integrate Develop branch
Diffstat (limited to 'examples/Makefile')
| -rw-r--r-- | examples/Makefile | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/examples/Makefile b/examples/Makefile index cde8ca9a..7c6a1cea 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -30,16 +30,6 @@ # 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 NO to use OpenAL Soft as static library (shared by default) -SHARED_OPENAL ?= NO - -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 @@ -60,6 +50,30 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) endif endif +# 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 +endif + +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= NO + +ifeq ($(PLATFORM),PLATFORM_WEB) + SHARED_OPENAL = NO +endif + # define compiler: gcc for C program, define as g++ for C++ ifeq ($(PLATFORM),PLATFORM_WEB) # define emscripten compiler @@ -89,7 +103,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) CFLAGS = -O2 -s -Wall -std=c99 endif ifeq ($(PLATFORM_OS),LINUX) - CFLAGS = -O2 -s -Wall -std=c99 -D_DEFAULT_SOURCE + CFLAGS = -O2 -s -Wall -std=c99 -no-pie -D_DEFAULT_SOURCE endif ifeq ($(PLATFORM_OS),OSX) CFLAGS = -O2 -s -Wall -std=c99 @@ -131,7 +145,7 @@ endif INCLUDES = -I. -I$(RAYLIB_RELEASE) -I$(RAYLIB_PATH)/src -I$(RAYLIB_PATH)/src/external ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads + INCLUDES += -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),WINDOWS) |
