Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PLATFORM_RPI #3232

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions cmake/LibraryConfigurations.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,6 @@ elseif (${PLATFORM} MATCHES "Android")
find_library(OPENGL_LIBRARY OpenGL)
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)

elseif (${PLATFORM} MATCHES "Raspberry Pi")
set(PLATFORM_CPP "PLATFORM_RPI")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")

add_definitions(-D_DEFAULT_SOURCE)

find_library(GLESV2 brcmGLESv2 HINTS /opt/vc/lib)
find_library(EGL brcmEGL HINTS /opt/vc/lib)
find_library(BCMHOST bcm_host HINTS /opt/vc/lib)
include_directories(/opt/vc/include /opt/vc/include/interface/vmcs_host/linux /opt/vc/include/interface/vcos/pthreads)
link_directories(/opt/vc/lib)
set(LIBS_PRIVATE ${GLESV2} ${EGL} ${BCMHOST} pthread rt m dl)

elseif ("${PLATFORM}" MATCHES "DRM")
set(PLATFORM_CPP "PLATFORM_DRM")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
Expand Down
50 changes: 1 addition & 49 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Define required environment variables
#------------------------------------------------------------------------------------------------
# Define target platform: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
PLATFORM ?= PLATFORM_DESKTOP

# Define required raylib variables
Expand Down Expand Up @@ -58,15 +58,6 @@ BUILD_WEB_HEAP_SIZE ?= 134217728
BUILD_WEB_RESOURCES ?= TRUE
BUILD_WEB_RESOURCES_PATH ?= $(dir $<)resources@resources

# Use cross-compiler for PLATFORM_RPI
ifeq ($(PLATFORM),PLATFORM_RPI)
USE_RPI_CROSS_COMPILER ?= FALSE
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
RPI_TOOLCHAIN ?= C:/SysGCC/Raspberry
RPI_TOOLCHAIN_SYSROOT ?= $(RPI_TOOLCHAIN)/arm-linux-gnueabihf/sysroot
endif
endif

# Determine PLATFORM_OS in case PLATFORM_DESKTOP or PLATFORM_WEB selected
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
Expand Down Expand Up @@ -95,12 +86,6 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
PLATFORM_OS = LINUX
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
Expand All @@ -118,9 +103,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif

# Default path for raylib on Raspberry Pi
ifeq ($(PLATFORM),PLATFORM_RPI)
RAYLIB_PATH ?= /home/pi/raylib
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
RAYLIB_PATH ?= /home/pi/raylib
endif
Expand Down Expand Up @@ -154,13 +136,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
CC = clang
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
# Define RPI cross-compiler
#CC = armv6j-hardfloat-linux-gnueabi-gcc
CC = $(RPI_TOOLCHAIN)/bin/arm-linux-gnueabihf-gcc
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# HTML5 emscripten compiler
# WARNING: To compile to HTML5, code must be redesigned
Expand Down Expand Up @@ -231,9 +206,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
CFLAGS += -std=gnu99
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
CFLAGS += -std=gnu99 -DEGL_NO_X11
endif
Expand All @@ -252,11 +224,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vmcs_host/linux
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vcos/pthreads
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
INCLUDE_PATHS += -I/usr/include/libdrm
endif
Expand Down Expand Up @@ -323,9 +290,6 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
# logic to a self contained function: UpdateDrawFrame(), check core_basic_window_web.c for reference.

endif
ifeq ($(PLATFORM),PLATFORM_RPI)
LDFLAGS += -L$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/lib
endif

# Define libraries required on linking: LDLIBS
# NOTE: To link libraries (lib<name>.so or lib<name>.a), use -l<name>
Expand Down Expand Up @@ -376,14 +340,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
LDLIBS += -lglfw
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
# Libraries for Raspberry Pi compiling
# NOTE: Required packages: libasound2-dev (ALSA)
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl -latomic
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
LDLIBS += -lvchiq_arm -lvcos
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
# Libraries for DRM compiling
# NOTE: Required packages: libasound2-dev (ALSA)
Expand Down Expand Up @@ -586,10 +542,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
rm -f *.o
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
find . -type f -executable -delete
rm -fv *.o
Expand Down
50 changes: 1 addition & 49 deletions examples/Makefile.Web
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

# Define required environment variables
#------------------------------------------------------------------------------------------------
# Define target platform: PLATFORM_DESKTOP, PLATFORM_RPI, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
PLATFORM ?= PLATFORM_WEB

# Define required raylib variables
Expand All @@ -51,15 +51,6 @@ USE_EXTERNAL_GLFW ?= FALSE
# NOTE: This variable is only used for PLATFORM_OS: LINUX
USE_WAYLAND_DISPLAY ?= FALSE

# Use cross-compiler for PLATFORM_RPI
ifeq ($(PLATFORM),PLATFORM_RPI)
USE_RPI_CROSS_COMPILER ?= FALSE
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
RPI_TOOLCHAIN ?= C:/SysGCC/Raspberry
RPI_TOOLCHAIN_SYSROOT ?= $(RPI_TOOLCHAIN)/arm-linux-gnueabihf/sysroot
endif
endif

# Determine PLATFORM_OS in case PLATFORM_DESKTOP or PLATFORM_WEB selected
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
Expand Down Expand Up @@ -88,12 +79,6 @@ ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_WEB))
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
PLATFORM_OS = LINUX
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
Expand All @@ -111,9 +96,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif

# Default path for raylib on Raspberry Pi
ifeq ($(PLATFORM),PLATFORM_RPI)
RAYLIB_PATH ?= /home/pi/raylib
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
RAYLIB_PATH ?= /home/pi/raylib
endif
Expand Down Expand Up @@ -147,13 +129,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
CC = clang
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
# Define RPI cross-compiler
#CC = armv6j-hardfloat-linux-gnueabi-gcc
CC = $(RPI_TOOLCHAIN)/bin/arm-linux-gnueabihf-gcc
endif
endif
ifeq ($(PLATFORM),PLATFORM_WEB)
# HTML5 emscripten compiler
# WARNING: To compile to HTML5, code must be redesigned
Expand Down Expand Up @@ -224,9 +199,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
CFLAGS += -std=gnu99
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
CFLAGS += -std=gnu99 -DEGL_NO_X11
endif
Expand All @@ -245,11 +217,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
INCLUDE_PATHS += -I$(RAYLIB_INCLUDE_PATH)
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vmcs_host/linux
INCLUDE_PATHS += -I$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/include/interface/vcos/pthreads
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
INCLUDE_PATHS += -I/usr/include/libdrm
endif
Expand Down Expand Up @@ -304,9 +271,6 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
LDFLAGS += --shell-file $(RAYLIB_PATH)/src/shell.html
EXT = .html
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
LDFLAGS += -L$(RPI_TOOLCHAIN_SYSROOT)/opt/vc/lib
endif

# Define libraries required on linking: LDLIBS
# NOTE: To link libraries (lib<name>.so or lib<name>.a), use -l<name>
Expand Down Expand Up @@ -357,14 +321,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
LDLIBS += -lglfw
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
# Libraries for Raspberry Pi compiling
# NOTE: Required packages: libasound2-dev (ALSA)
LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl -latomic
ifeq ($(USE_RPI_CROSS_COMPILER),TRUE)
LDLIBS += -lvchiq_arm -lvcos
endif
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
# Libraries for DRM compiling
# NOTE: Required packages: libasound2-dev (ALSA)
Expand Down Expand Up @@ -1065,10 +1021,6 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
rm -f *.o
endif
endif
ifeq ($(PLATFORM),PLATFORM_RPI)
find . -type f -executable -delete
rm -fv *.o
endif
ifeq ($(PLATFORM),PLATFORM_DRM)
find . -type f -executable -delete
rm -fv *.o
Expand Down
2 changes: 1 addition & 1 deletion examples/core/core_basic_window_web.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*
* raylib [core] example - Basic window (adapted for HTML5 platform)
*
* NOTE: This example is prepared to compile for PLATFORM_WEB, PLATFORM_DESKTOP and PLATFORM_RPI
* NOTE: This example is prepared to compile for PLATFORM_WEB, and PLATFORM_DESKTOP
* As you will notice, code structure is slightly diferent to the other examples...
* To compile it for PLATFORM_WEB just uncomment #define PLATFORM_WEB at beginning
*
Expand Down
9 changes: 2 additions & 7 deletions examples/core/core_input_gamepad.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@

// NOTE: Gamepad name ID depends on drivers and OS
#define XBOX360_LEGACY_NAME_ID "Xbox Controller"
#if defined(PLATFORM_RPI)
#define XBOX360_NAME_ID "Microsoft X-Box 360 pad"
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
#else
#define XBOX360_NAME_ID "Xbox 360 Controller"
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"
#endif
#define XBOX360_NAME_ID "Xbox 360 Controller"
#define PS3_NAME_ID "PLAYSTATION(R)3 Controller"

//------------------------------------------------------------------------------------
// Program main entry point
Expand Down
2 changes: 1 addition & 1 deletion examples/core/core_vr_simulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/models/models_skybox.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/others/raylib_opengl_interop.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#endif
#define GLSL_VERSION 330
#endif
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_basic_lighting.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_custom_uniform.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_eratosthenes.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_fog.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_hot_reloading.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_hybrid_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_julia_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_lightmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/shaders/shaders_mesh_instancing.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if defined(PLATFORM_DESKTOP)
#define GLSL_VERSION 330
#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
#else // PLATFORM_ANDROID, PLATFORM_WEB
#define GLSL_VERSION 100
#endif

Expand Down
Loading
Loading