From 789c5fbdf92df93ade774c2d3132e5ae2a207713 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Fri, 18 Sep 2020 20:53:57 +0200 Subject: [PATCH] Updated build script to generate .a on WebAssembly This is the recommended way --- examples/Makefile | 2 +- src/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Makefile b/examples/Makefile index 77cef9ebb..21482851f 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -353,7 +353,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI) endif ifeq ($(PLATFORM),PLATFORM_WEB) # Libraries for web (HTML5) compiling - LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.bc + LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a endif # Define all object files required diff --git a/src/Makefile b/src/Makefile index ac881a8c5..032f66c3d 100644 --- a/src/Makefile +++ b/src/Makefile @@ -468,8 +468,8 @@ all: raylib raylib: $(OBJS) ifeq ($(PLATFORM),PLATFORM_WEB) # Compile raylib libray for web - #$(AR) rcs $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).a $(OBJS) - $(CC) $(OBJS) -r -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).bc + #$(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)!" else ifeq ($(RAYLIB_LIBTYPE),SHARED)