blob: 508b6239420002c16cfa4525d98e7c741bc39444 [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
drh7771c542007-11-27 18:30:38 +000027CFLAGS="-Os -DSQLITE_ENABLE_FTS3=1 -DSQLITE_THREADSAFE=0"
28NAME=sqlite3-$VERS-osx-x86.bin
29echo '***** '"COMPILING $NAME..."
drhaa713672007-11-27 21:44:30 +000030gcc $CFLAGS -Itsrc sqlite3.c tsrc/shell.c -o $NAME -ldl
drh7771c542007-11-27 18:30:38 +000031strip $NAME
32chmod 644 $NAME
33gzip $NAME
34mkdir -p doc
35mv $NAME.gz doc