This commit is contained in:
2024-09-06 02:18:30 -04:00
commit 132e07d359
11 changed files with 273045 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -eu
pushd "$(dirname "$0")"
ARCH="$(uname -m)"
OS="$(uname -o)"
LIB_A="libsqlite3_${ARCH}"
if clang -v &> /dev/null; then
CC=clang
elif gcfc -v &> /dev/null; then
CC=gcc
else
echo "Missing 'gcc'/ 'clang'"
exit
fi
if [ $OS == "Darwin" ]; then
if libtool -V &> /dev/null; then
echo "Missing 'libtool'"
fi
fi
$CC -c -O3 -Qn "./sqlite3.c" -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_TEST_CONTROL
if [ $OS == "Darwin" ]; then
libtool -static "sqlite3.o" -o "../lib/${LIB_A}.a"
fi
rm *.o &> /dev/null
rm *.tmp &> /dev/null
popd