Improve the output from the ".testctrl opt" command in the CLI.
[sqlite.git] / Makefile.linux-generic
blobc7441fa517c4423dc52c652aafb511d47141a7e0
1 #!/usr/make
2 all:
4 # Makefile for SQLITE
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
16 # advantage of that.
18 ####
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.
33 CFLAGS =
34 CFLAGS.core = -fPIC
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.
45 LDFLAGS.zlib = -lz
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.
55 sqlite_cfg.h:
56 touch $@
57 distclean-.:
58 rm -f sqlite_cfg.h
61 # With the above in place, we can now import the rules make use of
62 # it...
64 include $(TOP)/main.mk