176800328Sdrh#!/usr/make 276800328Sdrh# 376800328Sdrh# Makefile for SQLITE 476800328Sdrh# 576800328Sdrh# This is a template makefile for SQLite. Most people prefer to 676800328Sdrh# use the autoconf generated "configure" script to generate the 776800328Sdrh# makefile automatically. But that does not work for everybody 876800328Sdrh# and in every situation. If you are having problems with the 976800328Sdrh# "configure" script, you might want to try this makefile as an 1076800328Sdrh# alternative. Create a copy of this file, edit the parameters 1176800328Sdrh# below and type "make". 1276800328Sdrh# 1376800328Sdrh 1476800328Sdrh#### The toplevel directory of the source tree. This is the directory 1576800328Sdrh# that contains this "Makefile.in" and the "configure.in" script. 1676800328Sdrh# 1776800328SdrhTOP = ../sqlite 1876800328Sdrh 1976800328Sdrh#### C Compiler and options for use in building executables that 2076800328Sdrh# will run on the platform that is doing the build. 2176800328Sdrh# 2276800328SdrhBCC = gcc -g -O2 2376800328Sdrh#BCC = /opt/ancic/bin/c89 -0 2476800328Sdrh 2576800328Sdrh#### If the target operating system supports the "usleep()" system 2676800328Sdrh# call, then define the HAVE_USLEEP macro for all C modules. 2776800328Sdrh# 2876800328Sdrh#USLEEP = 2976800328SdrhUSLEEP = -DHAVE_USLEEP=1 3076800328Sdrh 3176800328Sdrh#### If you want the SQLite library to be safe for use within a 3276800328Sdrh# multi-threaded program, then define the following macro 3376800328Sdrh# appropriately: 3476800328Sdrh# 3576800328Sdrh#THREADSAFE = -DTHREADSAFE=1 3676800328SdrhTHREADSAFE = -DTHREADSAFE=0 3776800328Sdrh 3876800328Sdrh#### Specify any extra linker options needed to make the library 3976800328Sdrh# thread safe 4076800328Sdrh# 4176800328Sdrh#THREADLIB = -lpthread 4276800328SdrhTHREADLIB = 4376800328Sdrh 44*f1878b4aSdrh#### Specify any extra libraries needed to access required functions. 45*f1878b4aSdrh# 46*f1878b4aSdrh#TLIBS = -lrt # fdatasync on Solaris 8 47*f1878b4aSdrhTLIBS = 48*f1878b4aSdrh 49faa57accSdrh#### Leave SQLITE_DEBUG undefined for maximum speed. Use SQLITE_DEBUG=1 50faa57accSdrh# to check for memory leaks. Use SQLITE_DEBUG=2 to print a log of all 5176800328Sdrh# malloc()s and free()s in order to track down memory leaks. 5276800328Sdrh# 5376800328Sdrh# SQLite uses some expensive assert() statements in the inner loop. 5476800328Sdrh# You can make the library go almost twice as fast if you compile 5576800328Sdrh# with -DNDEBUG=1 5676800328Sdrh# 57faa57accSdrh#OPTS = -DSQLITE_DEBUG=2 58faa57accSdrh#OPTS = -DSQLITE_DEBUG=1 5976800328Sdrh#OPTS = 6076800328SdrhOPTS = -DNDEBUG=1 61f2f23916SdrhOPTS += -DHAVE_FDATASYNC=1 6276800328Sdrh 6376800328Sdrh#### The suffix to add to executable files. ".exe" for windows. 6476800328Sdrh# Nothing for unix. 6576800328Sdrh# 6676800328Sdrh#EXE = .exe 6776800328SdrhEXE = 6876800328Sdrh 6976800328Sdrh#### C Compile and options for use in building executables that 7076800328Sdrh# will run on the target platform. This is usually the same 7176800328Sdrh# as BCC, unless you are cross-compiling. 7276800328Sdrh# 7376800328SdrhTCC = gcc -O6 7476800328Sdrh#TCC = gcc -g -O0 -Wall 7576800328Sdrh#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage 7676800328Sdrh#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6 7776800328Sdrh#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive 7876800328Sdrh 7976800328Sdrh#### Tools used to build a static library. 8076800328Sdrh# 8176800328SdrhAR = ar cr 8276800328Sdrh#AR = /opt/mingw/bin/i386-mingw32-ar cr 8376800328SdrhRANLIB = ranlib 8476800328Sdrh#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib 8576800328Sdrh 8676800328Sdrh#### Extra compiler options needed for programs that use the TCL library. 8776800328Sdrh# 8876800328Sdrh#TCL_FLAGS = 8976800328Sdrh#TCL_FLAGS = -DSTATIC_BUILD=1 9076800328SdrhTCL_FLAGS = -I/home/drh/tcltk/8.4linux 9176800328Sdrh#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 9276800328Sdrh#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux 9376800328Sdrh 9476800328Sdrh#### Linker options needed to link against the TCL library. 9576800328Sdrh# 9676800328Sdrh#LIBTCL = -ltcl -lm -ldl 9776800328SdrhLIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl 9876800328Sdrh#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt 9976800328Sdrh#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc 10076800328Sdrh 10176800328Sdrh#### Compiler options needed for programs that use the readline() library. 10276800328Sdrh# 1039c2ba47eSdrhREADLINE_FLAGS = 1049c2ba47eSdrh#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline 10576800328Sdrh 10676800328Sdrh#### Linker options needed by programs using readline() must link against. 10776800328Sdrh# 1089c2ba47eSdrhLIBREADLINE = 1099c2ba47eSdrh#LIBREADLINE = -static -lreadline -ltermcap 11076800328Sdrh 11176800328Sdrh#### Should the database engine assume text is coded as UTF-8 or iso8859? 11276800328Sdrh# 11376800328Sdrh# ENCODING = UTF8 11476800328SdrhENCODING = ISO8859 11576800328Sdrh 116*f1878b4aSdrh 117*f1878b4aSdrh#### Which "awk" program provides nawk compatibilty 118*f1878b4aSdrh# 119*f1878b4aSdrh# NAWK = nawk 120*f1878b4aSdrhNAWK = awk 121*f1878b4aSdrh 12276800328Sdrh# You should not have to change anything below this line 12376800328Sdrh############################################################################### 12476800328Sdrhinclude $(TOP)/main.mk 125