coldfire: add generic support for 54418
[openadk.git] / package / sqlite / Makefile
blobb9d695fbb8c7b7724e1cf33507bd042cfbb60469
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include ${ADK_TOPDIR}/rules.mk
6 PKG_NAME:= sqlite
7 PKG_VERSION:= 3.37.1
8 PKG_RELEASE:= 1
9 PKG_HASH:= 40f22a13bf38bbcd4c7ac79bcfb42a72d5aa40930c1f3f822e30ccce295f0f2e
10 PKG_DESCR:= embeddable sql database cli
11 PKG_SECTION:= sys/misc
12 PKG_BUILDDEP:= ncurses readline
13 PKG_DEPENDS:= libsqlite libreadline libncurses
14 PKG_URL:= http://www.sqlite.org/
15 PKG_SITES:= http://www.sqlite.org/2021/
16 PKG_LIBNAME:= libsqlite
17 PKG_OPTS:= dev
18 PKG_NOPARALLEL:= 1
20 DISTFILES:= sqlite-autoconf-3370100.tar.gz
21 WRKDIST= ${WRKDIR}/sqlite-autoconf-3370100
23 PKG_SUBPKGS:= SQLITE_CLI LIBSQLITE
24 PKGSD_LIBSQLITE:= emeddable sql library
25 PKGSC_LIBSQLITE:= libs/db
27 include ${ADK_TOPDIR}/mk/host.mk
28 include ${ADK_TOPDIR}/mk/package.mk
30 $(eval $(call HOST_template,SQLITE,sqlite,${PKG_VERSION}-${PKG_RELEASE}))
31 $(eval $(call PKG_template,LIBSQLITE,libsqlite,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBSQLITE},${PKGSD_LIBSQLITE},${PKGSC_LIBSQLITE},${PKG_OPTS}))
32 $(eval $(call PKG_template,SQLITE_CLI,sqlite-cli,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
34 TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
36 ifeq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
37 CONFIGURE_ARGS+= --enable-dynamic-extensions=no
38 endif
40 CONFIGURE_ENV+= config_BUILD_CC="${CC_FOR_BUILD}" \
41 config_BUILD_CFLAGS="${CFLAGS_FOR_BUILD}" \
42 config_TARGET_CC="${TARGET_CC}" \
43 config_TARGET_CFLAGS="${TARGET_CFLAGS}" \
44 config_TARGET_READLINE_INC="-I${STAGING_TARGET_DIR}/usr/include" \
45 config_TARGET_READLINE_LIBS="-L${STAGING_TARGET_DIR}/usr/lib -lreadline -lncurses"
47 MAKE_FLAGS+= LIBPTHREAD=-lm
48 TARGET_CPPFLAGS+= -DSQLITE_SECURE_DELETE=1 \
49 -DSQLITE_THREADSAFE=1 \
50 -DSQLITE_ENABLE_FTS3=1 \
51 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
52 -DSQLITE_ENABLE_DBSTAT_VTAB=1
54 libsqlite-install:
55 ${INSTALL_DIR} ${IDIR_LIBSQLITE}/usr/lib
56 ${CP} ${WRKINST}/usr/lib/libsqlite3.so* ${IDIR_LIBSQLITE}/usr/lib
58 sqlite-cli-install:
59 ${INSTALL_DIR} ${IDIR_SQLITE_CLI}/usr/bin
60 ${INSTALL_BIN} ${WRKINST}/usr/bin/sqlite3 ${IDIR_SQLITE_CLI}/usr/bin
62 include ${ADK_TOPDIR}/mk/host-bottom.mk
63 include ${ADK_TOPDIR}/mk/pkg-bottom.mk