blob: ad5d4dd093235020cff1ea8b8ff1a3f5d02ed7c8 [file] [log] [blame]
drh76800322002-08-13 20:45:39 +00001#!/usr/make
2#
3# Makefile for SQLITE
4#
5# This is a template makefile for SQLite. Most people prefer to
6# use the autoconf generated "configure" script to generate the
7# makefile automatically. But that does not work for everybody
8# and in every situation. If you are having problems with the
9# "configure" script, you might want to try this makefile as an
10# alternative. Create a copy of this file, edit the parameters
11# below and type "make".
12#
13
14#### The toplevel directory of the source tree. This is the directory
15# that contains this "Makefile.in" and the "configure.in" script.
16#
17TOP = ../sqlite
18
19#### C Compiler and options for use in building executables that
20# will run on the platform that is doing the build.
21#
drh7dc35472019-09-03 16:23:41 +000022BCC = gcc -g -O0
drh76800322002-08-13 20:45:39 +000023#BCC = /opt/ancic/bin/c89 -0
24
25#### If the target operating system supports the "usleep()" system
26# call, then define the HAVE_USLEEP macro for all C modules.
27#
28#USLEEP =
29USLEEP = -DHAVE_USLEEP=1
30
31#### If you want the SQLite library to be safe for use within a
32# multi-threaded program, then define the following macro
33# appropriately:
34#
35#THREADSAFE = -DTHREADSAFE=1
36THREADSAFE = -DTHREADSAFE=0
37
38#### Specify any extra linker options needed to make the library
39# thread safe
40#
drh7dc35472019-09-03 16:23:41 +000041THREADLIB = -lpthread -lm -ldl
42#THREADLIB =
drh76800322002-08-13 20:45:39 +000043
drhf1878b42006-01-23 18:06:52 +000044#### Specify any extra libraries needed to access required functions.
45#
46#TLIBS = -lrt # fdatasync on Solaris 8
47TLIBS =
48
drhfaa57ac2004-06-09 14:01:51 +000049#### Leave SQLITE_DEBUG undefined for maximum speed. Use SQLITE_DEBUG=1
50# to check for memory leaks. Use SQLITE_DEBUG=2 to print a log of all
drh76800322002-08-13 20:45:39 +000051# malloc()s and free()s in order to track down memory leaks.
52#
53# SQLite uses some expensive assert() statements in the inner loop.
54# You can make the library go almost twice as fast if you compile
55# with -DNDEBUG=1
56#
drh7dc35472019-09-03 16:23:41 +000057OPTS += -DSQLITE_DEBUG=1
58OPTS += -DSQLITE_ENABLE_WHERETRACE
59OPTS += -DSQLITE_ENABLE_SELECTTRACE
drh76800322002-08-13 20:45:39 +000060
61#### The suffix to add to executable files. ".exe" for windows.
62# Nothing for unix.
63#
64#EXE = .exe
65EXE =
66
67#### C Compile and options for use in building executables that
68# will run on the target platform. This is usually the same
69# as BCC, unless you are cross-compiling.
70#
drh7dc35472019-09-03 16:23:41 +000071TCC = gcc -O0
drh76800322002-08-13 20:45:39 +000072#TCC = gcc -g -O0 -Wall
73#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
74#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
75#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
76
77#### Tools used to build a static library.
78#
79AR = ar cr
80#AR = /opt/mingw/bin/i386-mingw32-ar cr
81RANLIB = ranlib
82#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
83
danielk197769e777f2006-06-14 10:38:02 +000084MKSHLIB = gcc -shared
85SO = so
86SHPREFIX = lib
87# SO = dll
88# SHPREFIX =
89
drh76800322002-08-13 20:45:39 +000090#### Extra compiler options needed for programs that use the TCL library.
91#
drh7dc35472019-09-03 16:23:41 +000092TCL_FLAGS = -I/home/drh/tcl/include/tcl8.6
drh76800322002-08-13 20:45:39 +000093
94#### Linker options needed to link against the TCL library.
95#
96#LIBTCL = -ltcl -lm -ldl
drh7dc35472019-09-03 16:23:41 +000097LIBTCL = /home/drh/tcl/lib/libtcl8.6.a -lm -lpthread -ldl -lz
drh76800322002-08-13 20:45:39 +000098
chw65d3c132007-11-12 21:09:10 +000099#### Additional objects for SQLite library when TCL support is enabled.
100#TCLOBJ =
101TCLOBJ = tclsqlite.o
102
drh76800322002-08-13 20:45:39 +0000103#### Compiler options needed for programs that use the readline() library.
104#
drh9c2ba472005-03-11 18:06:40 +0000105READLINE_FLAGS =
106#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
drh76800322002-08-13 20:45:39 +0000107
108#### Linker options needed by programs using readline() must link against.
109#
drh9c2ba472005-03-11 18:06:40 +0000110LIBREADLINE =
111#LIBREADLINE = -static -lreadline -ltermcap
drh76800322002-08-13 20:45:39 +0000112
drh76800322002-08-13 20:45:39 +0000113# You should not have to change anything below this line
114###############################################################################
115include $(TOP)/main.mk