sqlcipher.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. ################################################################################
  2. #
  3. # sqlcipher
  4. #
  5. ################################################################################
  6. SQLCIPHER_VERSION = v1.1.9
  7. SQLCIPHER_SITE = $(call github,sqlcipher,sqlcipher,$(SQLCIPHER_VERSION))
  8. SQLCIPHER_DEPENDENCIES = openssl host-tcl
  9. SQLCIPHER_INSTALL_STAGING = YES
  10. SQLCIPHER_CONF_ENV = \
  11. CFLAGS+=" $(SQLCIPHER_CFLAGS)" \
  12. LDFLAGS+=" $(SQLCIPHER_LDFLAGS)" \
  13. TCLSH_CMD=$(HOST_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR)
  14. SQLCIPHER_CONF_OPT = \
  15. --enable-threadsafe \
  16. --localstatedir=/var
  17. SQLCIPHER_CFLAGS += -DSQLITE_HAS_CODEC # Required according to the README
  18. SQLCIPHER_LDFLAGS += -lcrypto
  19. ifneq ($(BR2_LARGEFILE),y)
  20. # the sqlite configure script fails to define SQLITE_DISABLE_LFS when
  21. # --disable-largefile is passed, breaking the build. Work around it by
  22. # simply adding it to CFLAGS for configure instead
  23. SQLCIPHER_CFLAGS += -DSQLITE_DISABLE_LFS
  24. endif
  25. ifeq ($(BR2_PACKAGE_SQLCIPHER_STAT3),y)
  26. SQLCIPHER_CFLAGS += -DSQLITE_ENABLE_STAT3
  27. endif
  28. ifeq ($(BR2_xtensa),y)
  29. SQLCIPHER_CFLAGS += -mtext-section-literals
  30. endif
  31. ifeq ($(BR2_PACKAGE_SQLCIPHER_READLINE),y)
  32. SQLCIPHER_DEPENDENCIES += ncurses readline
  33. SQLCIPHER_CONF_OPT += --with-readline-inc="-I$(STAGING_DIR)/usr/include"
  34. else
  35. SQLCIPHER_CONF_OPT += --disable-readline
  36. endif
  37. $(eval $(autotools-package))