blob: 388f930dec865a1320ed93ea49541d6337d5a969 [file] [log] [blame]
drh7771c542007-11-27 18:30:38 +00001#!/bin/sh
2#
3# This script is used to compile SQLite and package everything up
4# so that it is ready to move to the SQLite website.
5#
6
7# Set srcdir to the name of the directory that contains the publish.sh
8# script.
9#
10srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'`
11
12# Get the makefile.
13#
14cp $srcdir/Makefile.linux-gcc ./Makefile
15chmod +x $srcdir/install-sh
16
17# Get the current version number - needed to help build filenames
18#
19VERS=`cat $srcdir/VERSION`
20VERSW=`sed 's/\./_/g' $srcdir/VERSION`
21echo "VERSIONS: $VERS $VERSW"
22
23# Start by building an sqlite shell for linux.
24#
25make clean
26make sqlite3.c
27make fts3amal.c
28cat fts3amal.c >>sqlite3.c
29CFLAGS="-Os -DSQLITE_ENABLE_FTS3=1 -DSQLITE_THREADSAFE=0"
30NAME=sqlite3-$VERS-osx-x86.bin
31echo '***** '"COMPILING $NAME..."
drhaa713672007-11-27 21:44:30 +000032gcc $CFLAGS -Itsrc sqlite3.c tsrc/shell.c -o $NAME -ldl
drh7771c542007-11-27 18:30:38 +000033strip $NAME
34chmod 644 $NAME
35gzip $NAME
36mkdir -p doc
37mv $NAME.gz doc