2023-05-23 23:36:06 +02:00
|
|
|
#!/bin/bash -e
|
|
|
|
|
|
|
|
LUAJIT_VERSION=2.1
|
|
|
|
|
|
|
|
. ./sdk.sh
|
|
|
|
|
|
|
|
if [ ! -d luajit-src ]; then
|
|
|
|
wget https://github.com/LuaJIT/LuaJIT/archive/v$LUAJIT_VERSION.tar.gz
|
2023-08-01 02:02:59 +03:00
|
|
|
tar -xzf v$LUAJIT_VERSION.tar.gz
|
2023-05-23 23:36:06 +02:00
|
|
|
mv LuaJIT-$LUAJIT_VERSION luajit-src
|
|
|
|
rm v$LUAJIT_VERSION.tar.gz
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd luajit-src
|
|
|
|
|
2023-08-01 02:02:59 +03:00
|
|
|
make amalg -j${NPROC} BUILDMODE=static
|
2023-05-23 23:36:06 +02:00
|
|
|
|
|
|
|
# update `include` folder
|
|
|
|
rm -rf ../luajit/include
|
|
|
|
mkdir -p ../luajit/include
|
|
|
|
cp -a ./src/*.h ../luajit/include
|
|
|
|
# update lib
|
|
|
|
rm -rf ../luajit/lib
|
|
|
|
mkdir -p ../luajit/lib
|
|
|
|
cp src/libluajit.a ../luajit/lib
|
|
|
|
|
|
|
|
echo "LuaJIT build successful"
|