fix cjson compile issues

This commit is contained in:
ading2210 2024-01-03 22:46:02 -05:00
parent e030ca6712
commit e695b1d14a
6 changed files with 47 additions and 24 deletions

View file

@ -8,9 +8,15 @@ OPENSSL_PREFIX=$(realpath build/openssl-wasm)
CJSON_PREFIX=$(realpath build/cjson-wasm)
CURL_PREFIX=$(realpath build/curl-wasm)
tools/openssl.sh
tools/cjson.sh
tools/curl.sh
if [ ! -d $OPENSSL_PREFIX ]; then
tools/openssl.sh
fi
if [ ! -d $CJSON_PREFIX ]; then
tools/cjson.sh
fi
if [ ! -d $CURL_PREFIX ]; then
tools/curl.sh
fi
cp -r $OPENSSL_PREFIX/* $CURL_PREFIX
cp -r $CJSON_PREFIX/* $CURL_PREFIX

View file

@ -14,7 +14,10 @@ rm -rf cjson
git clone -b master --depth=1 https://github.com/DaveGamble/cJSON cjson
cd cjson
emmake make all
sed -i 's/-fstack-protector-strong//' Makefile
sed -i 's/-fstack-protector//' Makefile
emmake make CC="emcc" static
INCLUDE_FILES="cJSON.h cJSON_Utils.h"
LIB_FILES="libcjson.a libcjson_utils.a"