• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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
27CFLAGS="-Os -DSQLITE_ENABLE_FTS3=1 -DSQLITE_THREADSAFE=0"
28NAME=sqlite3-$VERS-osx-x86.bin
29echo '***** '"COMPILING $NAME..."
30gcc $CFLAGS -Itsrc sqlite3.c tsrc/shell.c -o $NAME -ldl
31strip $NAME
32chmod 644 $NAME
33gzip $NAME
34mkdir -p doc
35mv $NAME.gz doc
36