6 # This is a template makefile for SQLite. Most people prefer to
7 # use the autoconf generated "configure" script to generate the
8 # makefile automatically. But that does not work for everybody
9 # and in every situation. If you are having problems with the
10 # "configure" script, you might want to try this makefile as an
11 # alternative. Create a copy of this file, edit the parameters
12 # below and type "make".
14 # Maintenance note: because this is the template for Linux systems, it
15 # is assumed that the platform has GNU make and this file takes
20 # $(TOP) = The toplevel directory of the source tree. This is the
21 # directory that contains "Makefile.in" and "auto.def".
23 TOP ?
= $(realpath
$(dir $(lastword
$(MAKEFILE_LIST
))))
26 # $(CFLAGS) will be used when compiling the library and most
27 # utilities. It must normally contain -fPIC on Linux systems,
28 # but overriding CFLAGS is an easy way for users to inadvertently
29 # remove -fPIC from their builds, so we generally expect to see
30 # -fPIC in $(CFLAGS.core), which main.mk will integrate with
31 # the CFLAGS where needed.
37 # $(SHELL_OPT) contains CFLAGS for building the sqlite3 CLI shell.
38 # See main.mk for other potentially-relevant vars which may need
39 # tweaking, like $(LDFLAGS_READLINE).
41 SHELL_OPT
+= -DHAVE_READLINE
=1
42 SHELL_OPT
+= -DSQLITE_HAVE_ZLIB
=1
43 LDFLAGS.readline
= -lreadline
# may need -lcurses etc, depending on the system
44 CFLAGS.readline
= # needs -I... if readline.h is in an unusual place.
48 # Library's version number.
50 PACKAGE_VERSION ?
= $(shell cat
$(TOP
)/VERSION
2>/dev
/null
)
52 # sqlite_cfg.h is typically created by the configure script. It's
53 # commonly not needed but main.mk does not know that so we have to
54 # create a dummy if we don't already have one.
61 # With the above in place, we can now import the rules make use of
64 include $(TOP
)/main.mk