From 9e2591e612bcf651ed8dca0d4ba242b64c694f25 Mon Sep 17 00:00:00 2001 From: Ray Date: Fri, 1 Nov 2024 12:14:06 +0100 Subject: [PATCH] Update Makefile --- examples/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index a3ce8f6d..304599cf 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -402,7 +402,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW) # Libraries for FreeBSD, OpenBSD, NetBSD, DragonFly desktop compiling # NOTE: Required packages: mesa-libs LDFLAGS += -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib - LDLIBS = -lraylib -lGL -lpthread -lm + LDLIBS = -lraylib -lGL -lm -lpthread # On XWindow requires also below libraries LDLIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor @@ -443,12 +443,14 @@ endif ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW) ifeq ($(PLATFORM_OS),WINDOWS) # Libraries for Windows desktop compilation - LDLIBS = ..\src\libraylib.a -lgdi32 -lwinmm -lopengl32 + LDFLAGS += -L..\src + LDLIBS = -lraylib -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 + LDFLAGS += -L../src + LDLIBS = -lraylib -lGL -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor -lm -lpthread -ldl -lrt # Explicit link to libc ifeq ($(RAYLIB_LIBTYPE),SHARED) @@ -461,7 +463,8 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_RGFW) ifeq ($(PLATFORM_OS),OSX) # Libraries for Debian GNU/Linux desktop compiling # NOTE: Required packages: libegl1-mesa-dev - LDLIBS = ../src/libraylib.a -lm + LDFLAGS += -L../src + LDLIBS = -lraylib -lm LDLIBS += -framework Foundation -framework AppKit -framework OpenGL -framework CoreVideo endif endif