Skip to content

Commit

Permalink
Revert "Makefile: Replace USE_WAYLAND_DISPLAY with DISABLE_WAYLAND"
Browse files Browse the repository at this point in the history
This reverts commit 9e79abd.
  • Loading branch information
M374LX committed Feb 25, 2024
1 parent 9e79abd commit 945a08b
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ USE_EXTERNAL_GLFW ?= FALSE
SDL_INCLUDE_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/include
SDL_LIBRARY_PATH ?= $(RAYLIB_SRC_PATH)/external/SDL2/lib

# Disable Wayland display server protocol on Linux desktop (and use X11 only)
# Use Wayland display server protocol on Linux desktop (by default it uses X11 windowing system)
# NOTE: This variable is only used for PLATFORM_OS: LINUX
DISABLE_WAYLAND ?= FALSE
USE_WAYLAND_DISPLAY ?= FALSE

# 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")
Expand Down Expand Up @@ -407,9 +407,7 @@ endif
# Use Wayland display on Linux desktop
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS), LINUX)
CFLAGS += -D_GLFW_X11

ifeq ($(DISABLE_WAYLAND),FALSE)
ifeq ($(USE_WAYLAND_DISPLAY),TRUE)
CFLAGS += -D_GLFW_WAYLAND
LDFLAGS += $(shell pkg-config wayland-client wayland-cursor wayland-egl xkbcommon --libs)

Expand Down Expand Up @@ -534,7 +532,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif
endif
ifeq ($(PLATFORM_OS),LINUX)
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt -lX11
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt
ifeq ($(USE_WAYLAND_DISPLAY),FALSE)
LDLIBS += -lX11
endif
# TODO: On ARM 32bit arch, miniaudio requires atomics library
#LDLIBS += -latomic
endif
Expand All @@ -555,7 +556,10 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP_SDL)
LDLIBS = -static-libgcc -lopengl32 -lgdi32
endif
ifeq ($(PLATFORM_OS),LINUX)
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt -lX11
LDLIBS = -lGL -lc -lm -lpthread -ldl -lrt
ifeq ($(USE_WAYLAND_DISPLAY),FALSE)
LDLIBS += -lX11
endif
endif
LDLIBS += -lSDL2 -lSDL2main
endif
Expand Down

0 comments on commit 945a08b

Please sign in to comment.