Skip to content

Commit

Permalink
WARNING: REVIEWED: Use libraylib.web.a naming on PLATFORM_WEB
Browse files Browse the repository at this point in the history
This change allows to have in same directory (currently `raylib/src`) two raylib build versions: Desktop and Web
  • Loading branch information
raysan5 committed Dec 18, 2024
1 parent f76734f commit de6c09e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/Makefile.Web
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit de6c09e

Please sign in to comment.