This commit is contained in:
Maxime Desroches 2024-11-27 23:35:46 -08:00
parent 43f2137f6d
commit 159e59ce07
2 changed files with 25 additions and 0 deletions

View File

@ -172,6 +172,15 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
PLATFORM_SHELL = sh PLATFORM_SHELL = sh
endif endif
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_COMMA)
UNAMEOS = $(shell uname)
ifeq ($(UNAMEOS),Linux)
PLATFORM_OS = LINUX
endif
ifndef PLATFORM_SHELL
PLATFORM_SHELL = sh
endif
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB) ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
ifeq ($(PLATFORM_OS),LINUX) ifeq ($(PLATFORM_OS),LINUX)
ifndef PLATFORM_SHELL ifndef PLATFORM_SHELL
@ -254,6 +263,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
# On DRM OpenGL ES 2.0 must be used # On DRM OpenGL ES 2.0 must be used
GRAPHICS = GRAPHICS_API_OPENGL_ES2 GRAPHICS = GRAPHICS_API_OPENGL_ES2
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_COMMA)
GRAPHICS = GRAPHICS_API_OPENGL_ES2
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_WEB) ifeq ($(TARGET_PLATFORM),PLATFORM_WEB)
# On HTML5 OpenGL ES 2.0 is used, emscripten translates it to WebGL 1.0 # On HTML5 OpenGL ES 2.0 is used, emscripten translates it to WebGL 1.0
GRAPHICS = GRAPHICS_API_OPENGL_ES2 GRAPHICS = GRAPHICS_API_OPENGL_ES2
@ -426,6 +438,9 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
CFLAGS += -DEGL_NO_X11 CFLAGS += -DEGL_NO_X11
CFLAGS += -Werror=implicit-function-declaration CFLAGS += -Werror=implicit-function-declaration
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_COMMA)
CFLAGS += -Werror=implicit-function-declaration
endif
# Use Wayland display on Linux desktop # Use Wayland display on Linux desktop
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW) ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
ifeq ($(PLATFORM_OS), LINUX) ifeq ($(PLATFORM_OS), LINUX)
@ -620,6 +635,12 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM)
LDLIBS += -latomic LDLIBS += -latomic
endif endif
endif endif
ifeq ($(TARGET_PLATFORM),PLATFORM_COMMA)
LDLIBS = -lGLESv2 -lEGL -lGL -lpthread -lrt -lm -ldl
ifeq ($(RAYLIB_MODULE_AUDIO),TRUE)
LDLIBS += -latomic
endif
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID) ifeq ($(TARGET_PLATFORM),PLATFORM_ANDROID)
LDLIBS = -llog -landroid -lEGL -lGLESv2 -lOpenSLES -lc -lm LDLIBS = -llog -landroid -lEGL -lGLESv2 -lOpenSLES -lc -lm
endif endif

View File

@ -548,6 +548,8 @@ const char *TextFormat(const char *text, ...); // Formatting of tex
#include "platforms/rcore_drm.c" #include "platforms/rcore_drm.c"
#elif defined(PLATFORM_ANDROID) #elif defined(PLATFORM_ANDROID)
#include "platforms/rcore_android.c" #include "platforms/rcore_android.c"
#elif defined(PLATFORM_COMMA)
#include "platforms/rcore_comma.c"
#else #else
// TODO: Include your custom platform backend! // TODO: Include your custom platform backend!
// i.e software rendering backend or console backend! // i.e software rendering backend or console backend!
@ -617,6 +619,8 @@ void InitWindow(int width, int height, const char *title)
TRACELOG(LOG_INFO, "Platform backend: NATIVE DRM"); TRACELOG(LOG_INFO, "Platform backend: NATIVE DRM");
#elif defined(PLATFORM_ANDROID) #elif defined(PLATFORM_ANDROID)
TRACELOG(LOG_INFO, "Platform backend: ANDROID"); TRACELOG(LOG_INFO, "Platform backend: ANDROID");
#elif defined(PLATFORM_COMMA)
TRACELOG(LOG_INFO, "Platform backend: COMMA");
#else #else
// TODO: Include your custom platform backend! // TODO: Include your custom platform backend!
// i.e software rendering backend or console backend! // i.e software rendering backend or console backend!