mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 22:10:01 -04:00
build cjson for emscripten
This commit is contained in:
parent
2a511ff6e9
commit
e030ca6712
4 changed files with 46 additions and 1 deletions
27
client/tools/cjson.sh
Executable file
27
client/tools/cjson.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
#compile cjson for use with emscripten
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
CORE_COUNT=$(nproc --all)
|
||||
PREFIX=$(realpath build/cjson-wasm)
|
||||
mkdir -p $PREFIX
|
||||
|
||||
cd build
|
||||
rm -rf cjson
|
||||
git clone -b master --depth=1 https://github.com/DaveGamble/cJSON cjson
|
||||
cd cjson
|
||||
|
||||
emmake make all
|
||||
INCLUDE_FILES="cJSON.h cJSON_Utils.h"
|
||||
LIB_FILES="libcjson.a libcjson_utils.a"
|
||||
|
||||
rm -rf $PREFIX
|
||||
mkdir -p $PREFIX/include/cjson
|
||||
mkdir -p $PREFIX/lib
|
||||
cp $INCLUDE_FILES $PREFIX/include/cjson
|
||||
cp $LIB_FILES $PREFIX/lib
|
||||
|
||||
cd ../../
|
Loading…
Add table
Add a link
Reference in a new issue