botan.mk 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. ################################################################################
  2. #
  3. # botan
  4. #
  5. ################################################################################
  6. BOTAN_VERSION = 2.16.0
  7. BOTAN_SOURCE = Botan-$(BOTAN_VERSION).tar.xz
  8. BOTAN_SITE = http://botan.randombit.net/releases
  9. BOTAN_LICENSE = BSD-2-Clause
  10. BOTAN_LICENSE_FILES = license.txt
  11. BOTAN_INSTALL_STAGING = YES
  12. BOTAN_CONF_OPTS = \
  13. --cpu=$(BR2_ARCH) \
  14. --os=linux \
  15. --cc=gcc \
  16. --cc-bin="$(TARGET_CXX)" \
  17. --ldflags="$(BOTAN_LDFLAGS)" \
  18. --prefix=/usr \
  19. --without-documentation
  20. BOTAN_LDFLAGS = $(TARGET_LDFLAGS)
  21. ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
  22. BOTAN_LDFLAGS += -latomic
  23. endif
  24. ifeq ($(BR2_SHARED_LIBS),y)
  25. BOTAN_CONF_OPTS += \
  26. --disable-static-library \
  27. --enable-shared-library
  28. else ifeq ($(BR2_STATIC_LIBS),y)
  29. BOTAN_CONF_OPTS += \
  30. --disable-shared-library \
  31. --enable-static-library \
  32. --no-autoload
  33. else ifeq ($(BR2_SHARED_STATIC_LIBS),y)
  34. BOTAN_CONF_OPTS += \
  35. --enable-shared-library \
  36. --enable-static-library
  37. endif
  38. ifeq ($(BR2_TOOLCHAIN_HAS_SSP),y)
  39. BOTAN_CONF_OPTS += --with-stack-protector
  40. else
  41. BOTAN_CONF_OPTS += --without-stack-protector
  42. endif
  43. ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
  44. BOTAN_CONF_OPTS += --without-os-feature=getauxval
  45. endif
  46. ifeq ($(BR2_PACKAGE_BOOST),y)
  47. BOTAN_DEPENDENCIES += boost
  48. BOTAN_CONF_OPTS += --with-boost
  49. endif
  50. ifeq ($(BR2_PACKAGE_BZIP2),y)
  51. BOTAN_DEPENDENCIES += bzip2
  52. BOTAN_CONF_OPTS += --with-bzip2
  53. endif
  54. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  55. BOTAN_DEPENDENCIES += openssl
  56. BOTAN_CONF_OPTS += --with-openssl
  57. endif
  58. ifeq ($(BR2_PACKAGE_SQLITE),y)
  59. BOTAN_DEPENDENCIES += sqlite
  60. BOTAN_CONF_OPTS += --with-sqlite
  61. endif
  62. ifeq ($(BR2_PACKAGE_XZ),y)
  63. BOTAN_DEPENDENCIES += xz
  64. BOTAN_CONF_OPTS += --with-lzma
  65. endif
  66. ifeq ($(BR2_PACKAGE_ZLIB),y)
  67. BOTAN_DEPENDENCIES += zlib
  68. BOTAN_CONF_OPTS += --with-zlib
  69. endif
  70. ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),)
  71. BOTAN_CONF_OPTS += --disable-altivec
  72. endif
  73. ifeq ($(BR2_ARM_CPU_HAS_NEON),)
  74. BOTAN_CONF_OPTS += --disable-neon
  75. endif
  76. define BOTAN_CONFIGURE_CMDS
  77. (cd $(@D); $(TARGET_MAKE_ENV) ./configure.py $(BOTAN_CONF_OPTS))
  78. endef
  79. define BOTAN_BUILD_CMDS
  80. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) AR="$(TARGET_AR)"
  81. endef
  82. define BOTAN_INSTALL_STAGING_CMDS
  83. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
  84. endef
  85. define BOTAN_INSTALL_TARGET_CMDS
  86. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
  87. endef
  88. $(eval $(generic-package))