2024-08-09 13:23:18 -07:00
|
|
|
dist/.stammp:
|
2024-08-05 16:46:35 -07:00
|
|
|
mkdir -p dist
|
|
|
|
|
touch $@
|
|
|
|
|
|
2024-08-09 13:23:18 -07:00
|
|
|
dist/sqlite-amalgamation-3310100/.stamp: dist/.stammp
|
|
|
|
|
rm -rf dist/sqlite-amalgamation-3310100/ || true
|
2024-08-05 16:46:35 -07:00
|
|
|
curl -q -o sqlite-amalgamation-3310100.zip https://www.sqlite.org/2020/sqlite-amalgamation-3310100.zip
|
|
|
|
|
unzip -d dist/ sqlite-amalgamation-3310100.zip
|
|
|
|
|
rm sqlite-amalgamation-3310100.zip
|
|
|
|
|
touch $@
|
|
|
|
|
|
2024-08-09 13:23:18 -07:00
|
|
|
dist/t3310100: demo.c dist/sqlite-amalgamation-3310100/.stamp ../../sqlite-vec.c
|
|
|
|
|
gcc \
|
|
|
|
|
-lm \
|
|
|
|
|
-DSQLITE_CORE -DSQLITE_ENABLE_JSON1 \
|
|
|
|
|
-I dist/sqlite-amalgamation-3310100 \
|
|
|
|
|
-I ../../ \
|
|
|
|
|
$< dist/sqlite-amalgamation-3310100/sqlite3.c \
|
|
|
|
|
../../sqlite-vec.c \
|
|
|
|
|
-o $@
|
|
|
|
|
|
|
|
|
|
dist/t3310100-threadsafe: demo.c dist/sqlite-amalgamation-3310100/.stamp ../../sqlite-vec.c
|
2024-08-05 16:46:35 -07:00
|
|
|
gcc \
|
2024-08-05 16:55:45 -07:00
|
|
|
-lm \
|
2024-08-09 13:23:18 -07:00
|
|
|
-DSQLITE_CORE -DSQLITE_ENABLE_JSON1 -DSQLITE_THREADSAFE=0 \
|
2024-08-05 16:46:35 -07:00
|
|
|
-I dist/sqlite-amalgamation-3310100 \
|
|
|
|
|
-I ../../ \
|
|
|
|
|
$< dist/sqlite-amalgamation-3310100/sqlite3.c \
|
|
|
|
|
../../sqlite-vec.c \
|
|
|
|
|
-o $@
|
|
|
|
|
|
2024-08-09 13:23:18 -07:00
|
|
|
test: dist/t3310100 dist/t3310100-threadsafe
|
2024-08-05 16:46:35 -07:00
|
|
|
./dist/t3310100
|
2024-08-09 13:23:18 -07:00
|
|
|
./dist/t3310100-threadsafe
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -rf dist/
|