sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
sqlite / Makefile.linux-generic
| 1 | #!/usr/make |
| 2 | all: |
| 3 | # |
| 4 | # Makefile for SQLITE |
| 5 | # |
| 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". |
| 13 | # |
| 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. |
| 17 | # |
| 18 | #### |
| 19 | # |
| 20 | # $(TOP) = The toplevel directory of the source tree. This is the |
| 21 | # directory that contains "Makefile.in" and "auto.def". |
| 22 | # |
| 23 | TOP ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST)))) |
| 24 | |
| 25 | # |
| 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. |
| 32 | # |
| 33 | CFLAGS = |
| 34 | CFLAGS.core = -fPIC |
| 35 | |
| 36 | # |
| 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). |
| 40 | # |
| 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 |
| 46 | |
| 47 | # |
| 48 | # Library's version number. |
| 49 | # |
| 50 | PACKAGE_VERSION ?= $(shell cat $(TOP)/VERSION 2>/dev/null) |
| 51 | |
| 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 |
| 59 | |
| 60 | # |
| 61 | # With the above in place, we can now import the rules make use of |
| 62 | # it... |
| 63 | # |
| 64 | include $(TOP)/main.mk |