diff --git a/Makefile b/Makefile index 7bd8420..f271752 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ src/wally: ${SUBMODULES} $(SOURCES) if [ -f src/opencv/CMakeLists.txt ]; then cd src/ && ./emsdk/emsdk activate latest && source "${PWD}/src/emsdk/emsdk_env.sh" && EMSCRIPTEN="${PWD}/src/emsdk/upstream/emscripten" python3 opencv/platforms/js/build_js.py opencv_js --build_wasm && cd ../ && touch .opencvjs; fi .htslibjs: .emsdk .htslib - if [ -r src/htslib/Makefile ]; then cp -r src/htslib/ src/htslib_js/ && cd src/htslib_js/ && make clean && make distclean && ../emsdk/emsdk activate latest && source "${PWD}/src/emsdk/emsdk_env.sh" && autoheader && autoconf && EMSCRIPTEN="${PWD}/src/emsdk/upstream/emscripten" emconfigure ./configure CFLAGS="-s USE_ZLIB=1 -s USE_BZIP2=1" --disable-lzma --disable-plugins && emmake make CFLAGS="-O2 -s USE_ZLIB=1 -s USE_BZIP2=1" LDFLAGS="-O2 -s ERROR_ON_UNDEFINED_SYMBOLS=0" && cd ../../ && touch .htslibjs; fi + if [ -r src/htslib/Makefile ]; then cp -r src/htslib/ src/htslib_js/ && cd src/htslib_js/ && make clean && make distclean && ../emsdk/emsdk activate latest && source "${PWD}/src/emsdk/emsdk_env.sh" && autoheader && autoconf && EMSCRIPTEN="${PWD}/src/emsdk/upstream/emscripten" emconfigure ./configure --disable-lzma --disable-plugins && emmake make LDFLAGS="-O2 -s ERROR_ON_UNDEFINED_SYMBOLS=0" && cd ../../ && touch .htslibjs; fi html/image.js: .emsdk .opencvjs .htslibjs $(SOURCES) mkdir -p html/ && ./src/emsdk/emsdk activate latest && source "${PWD}/src/emsdk/emsdk_env.sh" && em++ -Isrc/ocv/include/opencv4/ -Isrc/htslib_js/ src/image.cpp -o html/image.js -Lsrc/opencv_js/lib/ -Lsrc/htslib_js/ -lopencv_core -lopencv_imgproc -lhts -lz -lbz2 -O3 -s USE_BOOST_HEADERS=1 -s NO_EXIT_RUNTIME=1 -s "EXPORTED_RUNTIME_METHODS=['ccall']" -s ASSERTIONS=1 --bind