summaryrefslogtreecommitdiffhomepage
path: root/examples/Makefile
diff options
context:
space:
mode:
authorColleague Riley <[email protected]>2024-05-07 14:30:52 -0400
committerGitHub <[email protected]>2024-05-07 20:30:52 +0200
commit9805fe0b1afe8a25a5c7be92468a58bc2fbf8e4a (patch)
tree9ffcdcf6389d9593a6ad00c47b0b96c558236916 /examples/Makefile
parentfa2b1c8f094db18466079fcd2f8e488bf89095c2 (diff)
downloadraylib-9805fe0b1afe8a25a5c7be92468a58bc2fbf8e4a.tar.gz
raylib-9805fe0b1afe8a25a5c7be92468a58bc2fbf8e4a.zip
make RGFW a custom platform (#3941)
* fix minor bugs and errors (x86) for the RGFW platform, update RGFW platform license, update makefile info for RGFW platform * revert * (RGFW) (winapi) fix mouse hide bug when cursor changes * ensure PLATFORM_SHELL is defined (PLATFORM_RGFW) --------- Co-authored-by: ColleagueRiley <[email protected]>
Diffstat (limited to 'examples/Makefile')
-rw-r--r--examples/Makefile34
1 files changed, 32 insertions, 2 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 9ce05da5..52945c4b 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -13,6 +13,11 @@
# - Windows (Win32, Win64)
# - Linux (X11/Wayland desktop mode)
# - Others (not tested)
+# > PLATFORM_DESKTOP_RGFW (RGFW backend):
+# - Windows (Win32, Win64)
+# - Linux (X11 desktop mode)
+# - macOS/OSX (x64, arm64 (not tested))
+# - Others (not tested)
# > PLATFORM_WEB:
# - HTML5 (WebAssembly)
# > PLATFORM_DRM:
@@ -45,7 +50,7 @@
# Define required environment variables
#------------------------------------------------------------------------------------------------
# Define target platform: PLATFORM_DESKTOP, PLATFORM_DESKTOP_SDL, PLATFORM_DRM, PLATFORM_ANDROID, PLATFORM_WEB
-PLATFORM ?= PLATFORM_DESKTOP
+PLATFORM ?= PLATFORM_DESKTOP_RGFW
# Define required raylib variables
PROJECT_NAME ?= raylib_examples
@@ -86,7 +91,7 @@ BUILD_WEB_RESOURCES ?= TRUE
BUILD_WEB_RESOURCES_PATH ?= $(dir $<)resources@resources
# Determine PLATFORM_OS when required
-ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_DESKTOP_SDL PLATFORM_WEB))
+ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_DESKTOP_SDL PLATFORM_WEB PLATFORM_DESKTOP_RGFW))
# No uname.exe on MinGW!, but OS=Windows_NT on Windows!
# ifeq ($(UNAME),Msys) -> Windows
ifeq ($(OS),Windows_NT)
@@ -416,6 +421,31 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP_SDL)
LDLIBS += -latomic
endif
endif
+ifeq ($(PLATFORM),PLATFORM_DESKTOP_RGFW)
+ ifeq ($(PLATFORM_OS),WINDOWS)
+ # Libraries for Windows desktop compilation
+ LDLIBS = ..\src\libraylib.a -lgdi32 -lwinmm -lopengl32
+ endif
+ ifeq ($(PLATFORM_OS),LINUX)
+ # Libraries for Debian GNU/Linux desktop compipling
+ # NOTE: Required packages: libegl1-mesa-dev
+ LDLIBS = ../src/libraylib.a -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt
+
+ # Explicit link to libc
+ ifeq ($(RAYLIB_LIBTYPE),SHARED)
+ LDLIBS += -lc
+ endif
+
+ # NOTE: On ARM 32bit arch, miniaudio requires atomics library
+ LDLIBS += -latomic
+ endif
+ ifeq ($(PLATFORM_OS),OSX)
+ # Libraries for Debian GNU/Linux desktop compiling
+ # NOTE: Required packages: libegl1-mesa-dev
+ LDLIBS = ../src/libraylib.a -lm
+ LDLIBS += -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo
+ endif
+endif
ifeq ($(PLATFORM),PLATFORM_DRM)
# Libraries for DRM compiling
# NOTE: Required packages: libasound2-dev (ALSA)