Skip to content

Commit

Permalink
build recipe with support for audioworklets (#8) and es6 export suppo…
Browse files Browse the repository at this point in the history
…rt (#7))
  • Loading branch information
albincorreya committed Jan 21, 2020
1 parent eab373b commit bf5b4fc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ BUILD_DIR_ES=builds
BINDING_CPP_ES=src/cpp/bindings.cpp
TO_INCLUDE_ES=src/cpp/include/essentiamin.cpp
POST_JS_WASM=src/js/wasm.module.post.js
ESSENTIA_TOOLS_JS=src/js/essentia.jstools.js

build:
@rm -rf $(BUILD_DIR_ES)
@mkdir $(BUILD_DIR_ES)

@echo "Compiling the bindings to bitcode ..."
Expand All @@ -25,13 +27,13 @@ build:
-s WASM=1 \
$(BUILD_DIR_ES)/essentiamin.bc ${LIB_DIR_ES}/essentia.a \
-o $(BUILD_DIR_ES)/essentiamin-$(ESSENTIAJS_VERSION)-module.js \
-s EXCEPTION_DEBUG \
-s ASSERTIONS=2 \
-s DISABLE_EXCEPTION_CATCHING=2 \
-s ALLOW_MEMORY_GROWTH=1 \
-s BINARYEN_ASYNC_COMPILATION=0 \
-s SINGLE_FILE=1 \
--post-js $(POST_JS_WASM) || exit 1
-s ALLOW_MEMORY_GROWTH=1 \
-s SINGLE_FILE=1 || exit 1

@cat $(POST_JS_WASM) >> $(BUILD_DIR_ES)/essentiamin-$(ESSENTIAJS_VERSION)-module.js

@cp $(ESSENTIA_TOOLS_JS) $(BUILD_DIR_ES)/
@echo "Done ..."

@echo "Removing unnecessary files ..."
Expand Down

0 comments on commit bf5b4fc

Please sign in to comment.