Makefile: Allow specifying SDL_LIBRARIES to link, this helps with SDL3

This commit is contained in:
evertonse 2024-11-06 19:06:02 -03:00
commit 98ad55fec2

View file

@ -118,6 +118,8 @@ GLFW_LINUX_ENABLE_X11 ?= TRUE
# WARNING: Library is not included in raylib, it MUST be configured by users
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
SDL_LIBRARIES ?= -lSDL2 -lSDL2main
# Determine if the file has root access (only required to install raylib)
# "whoami" prints the name of the user that calls him (so, if it is the root user, "whoami" prints "root")
@ -586,7 +588,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_SDL)
LDLIBS += -lX11
endif
endif
LDLIBS += -lSDL2 -lSDL2main
LDLIBS += $(SDL_LIBRARIES)
endif
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW)
ifeq ($(PLATFORM_OS),WINDOWS)