aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilan Nikolic <gen2brain@gmail.com>2017-01-26 21:49:18 +0100
committerMilan Nikolic <gen2brain@gmail.com>2017-01-26 21:49:18 +0100
commita1527f56202c4967da80770c7f7609b7906f3977 (patch)
treea8c2e59fbe7758ec6216f789cb93555820ff4a78 /src
parent3c3a9318ffe34312bc6c08c10a68bae90ac20080 (diff)
downloadraylib-a1527f56202c4967da80770c7f7609b7906f3977.tar.gz
raylib-a1527f56202c4967da80770c7f7609b7906f3977.zip
Fix RPi build and add missing directories
Diffstat (limited to 'src')
-rw-r--r--src/Makefile26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index fff3d436..4c2278f5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -83,6 +83,10 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
ANDROID_TOOLCHAIN = $(CURDIR)/toolchain
endif
+ifeq ($(PLATFORM),PLATFORM_RPI)
+ CROSS_COMPILE ?= NO
+endif
+
# define raylib graphics api depending on selected platform
ifeq ($(PLATFORM),PLATFORM_ANDROID)
GRAPHICS = GRAPHICS_API_OPENGL_ES2
@@ -124,6 +128,13 @@ ifeq ($(PLATFORM),PLATFORM_ANDROID)
endif
endif
+ifeq ($(PLATFORM),PLATFORM_RPI)
+ ifeq ($(CROSS_COMPILE),YES)
+ # rpi compiler
+ CC = armv6j-hardfloat-linux-gnueabi-gcc
+ endif
+endif
+
ifeq ($(PLATFORM),PLATFORM_WEB)
# emscripten compiler
CC = emcc
@@ -170,11 +181,6 @@ endif
#CFLAGSEXTRA = -Wextra -Wmissing-prototypes -Wstrict-prototypes
# define any directories containing required header files
-ifeq ($(PLATFORM),PLATFORM_RPI)
- INCLUDES = -I. -Iexternal -I/opt/vc/include \
- -I/opt/vc/include/interface/vmcs_host/linux \
- -I/opt/vc/include/interface/vcos/pthreads
-endif
ifeq ($(PLATFORM),PLATFORM_ANDROID)
# STB libraries and others
INCLUDES = -I. -Iexternal
@@ -191,6 +197,16 @@ else
# OpenAL Soft library
INCLUDES += -Iexternal/openal_soft/include
endif
+ifeq ($(PLATFORM),PLATFORM_RPI)
+# STB libraries and others
+ INCLUDES = -I. -Iexternal
+# RPi libraries
+ INCLUDES += -I/opt/vc/include
+ INCLUDES += -I/opt/vc/include/interface/vmcs_host/linux
+ INCLUDES += -I/opt/vc/include/interface/vcos/pthreads
+# OpenAL Soft library
+ INCLUDES += -Iexternal/openal_soft/include
+endif
# define output directory for compiled library
ifeq ($(PLATFORM),PLATFORM_DESKTOP)