drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 1 | #!/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 | # |
| 17 | TOP = ../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 | # |
| 22 | BCC = gcc -g -O2 |
| 23 | #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 = |
| 29 | USLEEP = -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 |
| 36 | THREADSAFE = -DTHREADSAFE=0 |
| 37 | |
| 38 | #### Specify any extra linker options needed to make the library |
| 39 | # thread safe |
| 40 | # |
| 41 | #THREADLIB = -lpthread |
| 42 | THREADLIB = |
| 43 | |
drh | faa57ac | 2004-06-09 14:01:51 +0000 | [diff] [blame] | 44 | #### Leave SQLITE_DEBUG undefined for maximum speed. Use SQLITE_DEBUG=1 |
| 45 | # to check for memory leaks. Use SQLITE_DEBUG=2 to print a log of all |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 46 | # malloc()s and free()s in order to track down memory leaks. |
| 47 | # |
| 48 | # SQLite uses some expensive assert() statements in the inner loop. |
| 49 | # You can make the library go almost twice as fast if you compile |
| 50 | # with -DNDEBUG=1 |
| 51 | # |
drh | faa57ac | 2004-06-09 14:01:51 +0000 | [diff] [blame] | 52 | #OPTS = -DSQLITE_DEBUG=2 |
| 53 | #OPTS = -DSQLITE_DEBUG=1 |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 54 | #OPTS = |
| 55 | OPTS = -DNDEBUG=1 |
drh | f2f2391 | 2005-10-05 10:29:36 +0000 | [diff] [blame] | 56 | OPTS += -DHAVE_FDATASYNC=1 |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 57 | |
| 58 | #### The suffix to add to executable files. ".exe" for windows. |
| 59 | # Nothing for unix. |
| 60 | # |
| 61 | #EXE = .exe |
| 62 | EXE = |
| 63 | |
| 64 | #### C Compile and options for use in building executables that |
| 65 | # will run on the target platform. This is usually the same |
| 66 | # as BCC, unless you are cross-compiling. |
| 67 | # |
| 68 | TCC = gcc -O6 |
| 69 | #TCC = gcc -g -O0 -Wall |
| 70 | #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage |
| 71 | #TCC = /opt/mingw/bin/i386-mingw32-gcc -O6 |
| 72 | #TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive |
| 73 | |
| 74 | #### Tools used to build a static library. |
| 75 | # |
| 76 | AR = ar cr |
| 77 | #AR = /opt/mingw/bin/i386-mingw32-ar cr |
| 78 | RANLIB = ranlib |
| 79 | #RANLIB = /opt/mingw/bin/i386-mingw32-ranlib |
| 80 | |
| 81 | #### Extra compiler options needed for programs that use the TCL library. |
| 82 | # |
| 83 | #TCL_FLAGS = |
| 84 | #TCL_FLAGS = -DSTATIC_BUILD=1 |
| 85 | TCL_FLAGS = -I/home/drh/tcltk/8.4linux |
| 86 | #TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 |
| 87 | #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux |
| 88 | |
| 89 | #### Linker options needed to link against the TCL library. |
| 90 | # |
| 91 | #LIBTCL = -ltcl -lm -ldl |
| 92 | LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl |
| 93 | #LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt |
| 94 | #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc |
| 95 | |
| 96 | #### Compiler options needed for programs that use the readline() library. |
| 97 | # |
drh | 9c2ba47 | 2005-03-11 18:06:40 +0000 | [diff] [blame] | 98 | READLINE_FLAGS = |
| 99 | #READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 100 | |
| 101 | #### Linker options needed by programs using readline() must link against. |
| 102 | # |
drh | 9c2ba47 | 2005-03-11 18:06:40 +0000 | [diff] [blame] | 103 | LIBREADLINE = |
| 104 | #LIBREADLINE = -static -lreadline -ltermcap |
drh | 7680032 | 2002-08-13 20:45:39 +0000 | [diff] [blame] | 105 | |
| 106 | #### Should the database engine assume text is coded as UTF-8 or iso8859? |
| 107 | # |
| 108 | # ENCODING = UTF8 |
| 109 | ENCODING = ISO8859 |
| 110 | |
| 111 | # You should not have to change anything below this line |
| 112 | ############################################################################### |
| 113 | include $(TOP)/main.mk |