mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-12 14:00:01 -04:00
fix cjson compile issues
This commit is contained in:
parent
e030ca6712
commit
e695b1d14a
6 changed files with 47 additions and 24 deletions
|
@ -8,19 +8,15 @@ CACERT_FILE="cacert.pem"
|
|||
OUT_FILE="out/libcurl.js"
|
||||
|
||||
EXPORTED_FUNCS="_main,_perform_request,_copy_bytes"
|
||||
RUNTIME_METHODS="addFunction,removeFunction"
|
||||
COMPILER_OPTIONS="-o $OUT_FILE -lcurl -lssl -lcrypto -I $INCLUDE_DIR -L $LIB_DIR"
|
||||
RUNTIME_METHODS="addFunction,removeFunction,allocate"
|
||||
COMPILER_OPTIONS="-o $OUT_FILE -lcurl -lssl -lcrypto -lcjson -I $INCLUDE_DIR -L $LIB_DIR"
|
||||
EMSCRIPTEN_OPTIONS="-lwebsocket.js -sWEBSOCKET_URL=wss://debug.ading.dev/ws -sASYNCIFY -sALLOW_TABLE_GROWTH -sEXPORTED_FUNCTIONS=$EXPORTED_FUNCS -sEXPORTED_RUNTIME_METHODS=$RUNTIME_METHODS --preload-file $CACERT_FILE"
|
||||
|
||||
if [ ! -f $CACERT_FILE ]; then
|
||||
wget "https://curl.se/ca/cacert.pem" -O $CACERT_FILE
|
||||
fi
|
||||
|
||||
if [ ! -d $INCLUDE_DIR ]; then
|
||||
mkdir -p build
|
||||
tools/openssl.sh
|
||||
tools/curl.sh
|
||||
fi
|
||||
tools/all_deps.sh
|
||||
|
||||
mkdir -p out
|
||||
COMPILE_CMD="emcc main.c $COMPILER_OPTIONS $EMSCRIPTEN_OPTIONS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue