xref: /sqlite-3.40.0/Makefile.linux-gcc (revision 76800328)
1*76800328Sdrh#!/usr/make
2*76800328Sdrh#
3*76800328Sdrh# Makefile for SQLITE
4*76800328Sdrh#
5*76800328Sdrh# This is a template makefile for SQLite.  Most people prefer to
6*76800328Sdrh# use the autoconf generated "configure" script to generate the
7*76800328Sdrh# makefile automatically.  But that does not work for everybody
8*76800328Sdrh# and in every situation.  If you are having problems with the
9*76800328Sdrh# "configure" script, you might want to try this makefile as an
10*76800328Sdrh# alternative.  Create a copy of this file, edit the parameters
11*76800328Sdrh# below and type "make".
12*76800328Sdrh#
13*76800328Sdrh
14*76800328Sdrh#### The toplevel directory of the source tree.  This is the directory
15*76800328Sdrh#    that contains this "Makefile.in" and the "configure.in" script.
16*76800328Sdrh#
17*76800328SdrhTOP = ../sqlite
18*76800328Sdrh
19*76800328Sdrh#### C Compiler and options for use in building executables that
20*76800328Sdrh#    will run on the platform that is doing the build.
21*76800328Sdrh#
22*76800328SdrhBCC = gcc -g -O2
23*76800328Sdrh#BCC = /opt/ancic/bin/c89 -0
24*76800328Sdrh
25*76800328Sdrh#### If the target operating system supports the "usleep()" system
26*76800328Sdrh#    call, then define the HAVE_USLEEP macro for all C modules.
27*76800328Sdrh#
28*76800328Sdrh#USLEEP =
29*76800328SdrhUSLEEP = -DHAVE_USLEEP=1
30*76800328Sdrh
31*76800328Sdrh#### If you want the SQLite library to be safe for use within a
32*76800328Sdrh#    multi-threaded program, then define the following macro
33*76800328Sdrh#    appropriately:
34*76800328Sdrh#
35*76800328Sdrh#THREADSAFE = -DTHREADSAFE=1
36*76800328SdrhTHREADSAFE = -DTHREADSAFE=0
37*76800328Sdrh
38*76800328Sdrh#### Specify any extra linker options needed to make the library
39*76800328Sdrh#    thread safe
40*76800328Sdrh#
41*76800328Sdrh#THREADLIB = -lpthread
42*76800328SdrhTHREADLIB =
43*76800328Sdrh
44*76800328Sdrh#### Leave MEMORY_DEBUG undefined for maximum speed.  Use MEMORY_DEBUG=1
45*76800328Sdrh#    to check for memory leaks.  Use MEMORY_DEBUG=2 to print a log of all
46*76800328Sdrh#    malloc()s and free()s in order to track down memory leaks.
47*76800328Sdrh#
48*76800328Sdrh#    SQLite uses some expensive assert() statements in the inner loop.
49*76800328Sdrh#    You can make the library go almost twice as fast if you compile
50*76800328Sdrh#    with -DNDEBUG=1
51*76800328Sdrh#
52*76800328Sdrh#OPTS = -DMEMORY_DEBUG=2
53*76800328Sdrh#OPTS = -DMEMORY_DEBUG=1
54*76800328Sdrh#OPTS =
55*76800328SdrhOPTS = -DNDEBUG=1
56*76800328Sdrh
57*76800328Sdrh#### The suffix to add to executable files.  ".exe" for windows.
58*76800328Sdrh#    Nothing for unix.
59*76800328Sdrh#
60*76800328Sdrh#EXE = .exe
61*76800328SdrhEXE =
62*76800328Sdrh
63*76800328Sdrh#### C Compile and options for use in building executables that
64*76800328Sdrh#    will run on the target platform.  This is usually the same
65*76800328Sdrh#    as BCC, unless you are cross-compiling.
66*76800328Sdrh#
67*76800328SdrhTCC = gcc -O6
68*76800328Sdrh#TCC = gcc -g -O0 -Wall
69*76800328Sdrh#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
70*76800328Sdrh#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
71*76800328Sdrh#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
72*76800328Sdrh
73*76800328Sdrh#### Tools used to build a static library.
74*76800328Sdrh#
75*76800328SdrhAR = ar cr
76*76800328Sdrh#AR = /opt/mingw/bin/i386-mingw32-ar cr
77*76800328SdrhRANLIB = ranlib
78*76800328Sdrh#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
79*76800328Sdrh
80*76800328Sdrh#### Extra compiler options needed for programs that use the TCL library.
81*76800328Sdrh#
82*76800328Sdrh#TCL_FLAGS =
83*76800328Sdrh#TCL_FLAGS = -DSTATIC_BUILD=1
84*76800328SdrhTCL_FLAGS = -I/home/drh/tcltk/8.4linux
85*76800328Sdrh#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1
86*76800328Sdrh#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
87*76800328Sdrh
88*76800328Sdrh#### Linker options needed to link against the TCL library.
89*76800328Sdrh#
90*76800328Sdrh#LIBTCL = -ltcl -lm -ldl
91*76800328SdrhLIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl
92*76800328Sdrh#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt
93*76800328Sdrh#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
94*76800328Sdrh
95*76800328Sdrh#### Compiler options needed for programs that use the readline() library.
96*76800328Sdrh#
97*76800328Sdrh#READLINE_FLAGS =
98*76800328SdrhREADLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
99*76800328Sdrh
100*76800328Sdrh#### Linker options needed by programs using readline() must link against.
101*76800328Sdrh#
102*76800328Sdrh#LIBREADLINE =
103*76800328SdrhLIBREADLINE = -static -lreadline -ltermcap
104*76800328Sdrh
105*76800328Sdrh#### Should the database engine assume text is coded as UTF-8 or iso8859?
106*76800328Sdrh#
107*76800328Sdrh# ENCODING  = UTF8
108*76800328SdrhENCODING = ISO8859
109*76800328Sdrh
110*76800328Sdrh# You should not have to change anything below this line
111*76800328Sdrh###############################################################################
112*76800328Sdrhinclude $(TOP)/main.mk
113