From de6c09ee7aab56adb625eb6d2611f7e974af7c47 Mon Sep 17 00:00:00 2001 From: Ray Date: Wed, 18 Dec 2024 11:45:55 +0100 Subject: [PATCH] WARNING: REVIEWED: Use `libraylib.web.a` naming on PLATFORM_WEB This change allows to have in same directory (currently `raylib/src`) two raylib build versions: Desktop and Web --- examples/Makefile | 2 +- examples/Makefile.Web | 2 +- src/Makefile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 34cf36f04..57a772229 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -482,7 +482,7 @@ ifeq ($(TARGET_PLATFORM),PLATFORM_DRM) endif ifeq ($(TARGET_PLATFORM),PLATFORM_WEB) # Libraries for web (HTML5) compiling - LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a + LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.web.a endif # Define source code object files required diff --git a/examples/Makefile.Web b/examples/Makefile.Web index dd5dc6881..92bcfa229 100644 --- a/examples/Makefile.Web +++ b/examples/Makefile.Web @@ -365,7 +365,7 @@ ifeq ($(PLATFORM),PLATFORM_DRM) endif ifeq ($(PLATFORM),PLATFORM_WEB) # Libraries for web (HTML5) compiling - LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a + LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.web.a endif # Define source code object files required diff --git a/src/Makefile b/src/Makefile index 7dde52fbd..1e3ddb791 100644 --- a/src/Makefile +++ b/src/Makefile @@ -662,8 +662,8 @@ raylib: $(OBJS) ifeq ($(TARGET_PLATFORM),PLATFORM_WEB) # Compile raylib libray for web #$(CC) $(OBJS) -r -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).bc - $(AR) rcs $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).a $(OBJS) - @echo "raylib library generated (lib$(RAYLIB_LIB_NAME).a)!" + $(AR) rcs $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).web.a $(OBJS) + @echo "raylib library generated (lib$(RAYLIB_LIB_NAME).web.a)!" else ifeq ($(RAYLIB_LIBTYPE),SHARED) ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW PLATFORM_DESKTOP_SDL PLATFORM_DESKTOP_RGFW))