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 44f1878b4aSdrh#### Specify any extra libraries needed to access required functions. 45f1878b4aSdrh# 46f1878b4aSdrh#TLIBS = -lrt # fdatasync on Solaris 8 47f1878b4aSdrhTLIBS = 48f1878b4aSdrh 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 86*69e777f3Sdanielk1977MKSHLIB = gcc -shared 87*69e777f3Sdanielk1977SO = so 88*69e777f3Sdanielk1977SHPREFIX = lib 89*69e777f3Sdanielk1977# SO = dll 90*69e777f3Sdanielk1977# SHPREFIX = 91*69e777f3Sdanielk1977 9276800328Sdrh#### Extra compiler options needed for programs that use the TCL library. 9376800328Sdrh# 9476800328Sdrh#TCL_FLAGS = 9576800328Sdrh#TCL_FLAGS = -DSTATIC_BUILD=1 9676800328SdrhTCL_FLAGS = -I/home/drh/tcltk/8.4linux 9776800328Sdrh#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 9876800328Sdrh#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux 9976800328Sdrh 10076800328Sdrh#### Linker options needed to link against the TCL library. 10176800328Sdrh# 10276800328Sdrh#LIBTCL = -ltcl -lm -ldl 10376800328SdrhLIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl 10476800328Sdrh#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt 10576800328Sdrh#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc 10676800328Sdrh 10776800328Sdrh#### Compiler options needed for programs that use the readline() library. 10876800328Sdrh# 1099c2ba47eSdrhREADLINE_FLAGS = 1109c2ba47eSdrh#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline 11176800328Sdrh 11276800328Sdrh#### Linker options needed by programs using readline() must link against. 11376800328Sdrh# 1149c2ba47eSdrhLIBREADLINE = 1159c2ba47eSdrh#LIBREADLINE = -static -lreadline -ltermcap 11676800328Sdrh 11776800328Sdrh#### Should the database engine assume text is coded as UTF-8 or iso8859? 11876800328Sdrh# 11976800328Sdrh# ENCODING = UTF8 12076800328SdrhENCODING = ISO8859 12176800328Sdrh 122f1878b4aSdrh 123f1878b4aSdrh#### Which "awk" program provides nawk compatibilty 124f1878b4aSdrh# 125f1878b4aSdrh# NAWK = nawk 126f1878b4aSdrhNAWK = awk 127f1878b4aSdrh 12876800328Sdrh# You should not have to change anything below this line 12976800328Sdrh############################################################################### 13076800328Sdrhinclude $(TOP)/main.mk 131