2002-08-13 22:45:39 +02:00
|
|
|
#!/usr/make
|
2024-10-24 09:31:39 +02:00
|
|
|
all:
|
2002-08-13 22:45:39 +02:00
|
|
|
#
|
|
|
|
# Makefile for SQLITE
|
|
|
|
#
|
|
|
|
# This is a template makefile for SQLite. Most people prefer to
|
|
|
|
# use the autoconf generated "configure" script to generate the
|
|
|
|
# makefile automatically. But that does not work for everybody
|
|
|
|
# and in every situation. If you are having problems with the
|
|
|
|
# "configure" script, you might want to try this makefile as an
|
|
|
|
# alternative. Create a copy of this file, edit the parameters
|
|
|
|
# below and type "make".
|
|
|
|
#
|
2024-10-24 06:34:39 +02:00
|
|
|
# Maintenance note: because this is the template for Linux systems, it
|
|
|
|
# is assumed that the platform has GNU make and this file takes
|
|
|
|
# advantage of that.
|
|
|
|
#
|
|
|
|
####
|
|
|
|
#
|
|
|
|
# $(TOP) = The toplevel directory of the source tree. This is the
|
2024-10-24 09:31:39 +02:00
|
|
|
# directory that contains "Makefile.in" and "auto.def".
|
2002-08-13 22:45:39 +02:00
|
|
|
#
|
2024-10-24 09:31:39 +02:00
|
|
|
TOP ?= $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
|
2002-08-13 22:45:39 +02:00
|
|
|
|
2024-10-24 06:34:39 +02:00
|
|
|
#
|
|
|
|
# $(CFLAGS) will be used when compiling the library and most
|
2024-10-24 09:31:39 +02:00
|
|
|
# utilities. It must normally contain -fPIC on Linux systems.
|
2024-10-24 06:34:39 +02:00
|
|
|
#
|
2024-10-24 09:31:39 +02:00
|
|
|
CFLAGS = -fPIC
|
2002-08-13 22:45:39 +02:00
|
|
|
|
2024-10-24 06:34:39 +02:00
|
|
|
#
|
|
|
|
# $(SHELL_OPT) contains CFLAGS for building the sqlite3 CLI shell.
|
|
|
|
# See main.mk for other potentially-relevant vars which may need
|
|
|
|
# tweaking, like $(LDFLAGS_READLINE).
|
|
|
|
#
|
2024-10-24 09:31:39 +02:00
|
|
|
SHELL_OPT += -DHAVE_READLINE=1
|
|
|
|
SHELL_OPT += -DSQLITE_HAVE_ZLIB=1
|
|
|
|
LDFLAGS.readline = -lreadline # may need -lcurses etc, depending on the system
|
|
|
|
CFLAGS.readline = # needs -I... if readline.h is in an unusual place.
|
|
|
|
LDFLAGS.zlib = -lz
|
2024-10-24 05:50:40 +02:00
|
|
|
|
2024-10-24 06:34:39 +02:00
|
|
|
#
|
|
|
|
# Library's version number.
|
|
|
|
#
|
2024-10-28 15:46:33 +01:00
|
|
|
PACKAGE_VERSION ?= $(shell cat $(TOP)/VERSION 2>/dev/null)
|
2024-10-24 05:14:40 +02:00
|
|
|
|
2024-10-24 09:31:39 +02:00
|
|
|
# sqlite_cfg.h is typically created by the configure script. It's
|
|
|
|
# commonly not needed but main.mk does not know that so we have to
|
|
|
|
# create a dummy if we don't already have one.
|
2024-10-24 05:14:40 +02:00
|
|
|
sqlite_cfg.h:
|
|
|
|
touch $@
|
2024-10-24 05:50:40 +02:00
|
|
|
distclean-.:
|
|
|
|
rm -f sqlite_cfg.h
|
2024-10-24 09:31:39 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# With the above in place, we can now import the rules make use of
|
|
|
|
# it...
|
|
|
|
#
|
|
|
|
include $(TOP)/main.mk
|