Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND
This commit is contained in:
parent
260a039e77
commit
9e79abde78
1 changed files with 7 additions and 11 deletions
18
src/Makefile
18
src/Makefile
|
@ -101,9 +101,9 @@ USE_EXTERNAL_GLFW ?= FALSE
|
||||||
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
|
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
|
||||||
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
|
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib
|
||||||
|
|
||||||
# Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
|
# Disable Wayland display server protocol on Linux desktop (and use X11 only)
|
||||||
# NOTE: This variable is only used for PLATFORM_OS: LINUX
|
# NOTE: This variable is only used for PLATFORM_OS: LINUX
|
||||||
USE_WAYLAND_DISPLAY ?= FALSE
|
DISABLE_WAYLAND ?= FALSE
|
||||||
|
|
||||||
# Determine if the file has root access (only required to install raylib)
|
# 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")
|
# "whoami" prints the name of the user that calls him (so, if it is the root user, "whoami" prints "root")
|
||||||
|
@ -407,7 +407,9 @@ endif
|
||||||
# Use Wayland display on Linux desktop
|
# Use Wayland display on Linux desktop
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
ifeq ($(PLATFORM_OS), LINUX)
|
ifeq ($(PLATFORM_OS), LINUX)
|
||||||
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
|
CFLAGS += -D_GLFW_X11
|
||||||
|
|
||||||
|
ifeq ($(DISABLE_WAYLAND),FALSE)
|
||||||
CFLAGS += -D_GLFW_WAYLAND
|
CFLAGS += -D_GLFW_WAYLAND
|
||||||
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)
|
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)
|
||||||
|
|
||||||
|
@ -532,10 +534,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt
|
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt -lX11
|
||||||
ifeq ($(USE_WAYLAND_DISPLAY),FALSE)
|
|
||||||
LDLIBS += -lX11
|
|
||||||
endif
|
|
||||||
# TODO: On ARM 32bit arch, miniaudio requires atomics library
|
# TODO: On ARM 32bit arch, miniaudio requires atomics library
|
||||||
#LDLIBS += -latomic
|
#LDLIBS += -latomic
|
||||||
endif
|
endif
|
||||||
|
@ -556,10 +555,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP_SDL)
|
||||||
LDLIBS = -static-libgcc -lopengl32 -lgdi32
|
LDLIBS = -static-libgcc -lopengl32 -lgdi32
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM_OS),LINUX)
|
ifeq ($(PLATFORM_OS),LINUX)
|
||||||
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt
|
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt -lX11
|
||||||
ifeq ($(USE_WAYLAND_DISPLAY),FALSE)
|
|
||||||
LDLIBS += -lX11
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
LDLIBS += -lSDL2 -lSDL2main
|
LDLIBS += -lSDL2 -lSDL2main
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue