Browse Source

Updated library build script for HTML5 (emscripten 2.0.4)

pull/1381/head
raysan5 4 years ago
parent
commit
4a242c2889
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      src/Makefile

+ 5
- 3
src/Makefile View File

@ -239,6 +239,7 @@ endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
# HTML5 emscripten compiler # HTML5 emscripten compiler
CC = emcc CC = emcc
AR = emar
endif endif
ifeq ($(PLATFORM),PLATFORM_ANDROID) ifeq ($(PLATFORM),PLATFORM_ANDROID)
# Android toolchain (must be provided for desired architecture and compiler) # Android toolchain (must be provided for desired architecture and compiler)
@ -466,9 +467,10 @@ all: raylib
# NOTE: Release directory is created if not exist # NOTE: Release directory is created if not exist
raylib: $(OBJS) raylib: $(OBJS)
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
# Compile raylib for web.
$(CC) -O1 $(OBJS) -o $(RAYLIB_RELEASE_PATH)/lib$(RAYLIB_LIB_NAME).bc
@echo "raylib library generated (lib$(RAYLIB_LIB_NAME).bc)!"
# 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
@echo "raylib library generated (lib$(RAYLIB_LIB_NAME).a)!"
else else
ifeq ($(RAYLIB_LIBTYPE),SHARED) ifeq ($(RAYLIB_LIBTYPE),SHARED)
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM),PLATFORM_DESKTOP)

Loading…
Cancel
Save