Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #
  2. # Copyright (C) 2006-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=wolfssl
  9. PKG_VERSION:=3.12.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).zip
  12. PKG_SOURCE_URL:=https://www.wolfssl.com/
  13. PKG_HASH:=4993844c4b7919007c4511ec3f987fb06543536c3fc933cb53491bffe9150e49
  14. PKG_FIXUP:=libtool
  15. PKG_INSTALL:=1
  16. PKG_USE_MIPS16:=0
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_LICENSE:=GPL-2.0+
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/libcyassl
  21. SECTION:=libs
  22. SUBMENU:=SSL
  23. CATEGORY:=Libraries
  24. TITLE:=CyaSSL library
  25. URL:=http://www.wolfssl.com/
  26. MENU:=1
  27. endef
  28. define Package/libcyassl/description
  29. CyaSSL is an SSL library optimized for small footprint, both on disk and for
  30. memory use.
  31. endef
  32. define Package/libcyassl/config
  33. source "$(SOURCE)/Config.in"
  34. endef
  35. TARGET_CFLAGS += $(FPIC)
  36. # --enable-stunnel needed for OpenSSL API compatibility bits
  37. CONFIGURE_ARGS += \
  38. --enable-opensslextra \
  39. --enable-sni \
  40. --enable-stunnel \
  41. --disable-examples
  42. ifeq ($(CONFIG_IPV6),y)
  43. CONFIGURE_ARGS += \
  44. --enable-ipv6
  45. endif
  46. ifeq ($(CONFIG_CYASSL_HAS_AES_CCM),y)
  47. CONFIGURE_ARGS += \
  48. --enable-aesccm
  49. endif
  50. ifeq ($(CONFIG_CYASSL_HAS_AES_GCM),y)
  51. CONFIGURE_ARGS += \
  52. --enable-aesgcm
  53. endif
  54. ifeq ($(CONFIG_CYASSL_HAS_CHACHA),y)
  55. CONFIGURE_ARGS += \
  56. --enable-chacha
  57. endif
  58. ifeq ($(CONFIG_CYASSL_HAS_ECC),y)
  59. CONFIGURE_ARGS += \
  60. --enable-ecc \
  61. --enable-supportedcurves
  62. endif
  63. ifeq ($(CONFIG_CYASSL_HAS_DH),y)
  64. CONFIGURE_ARGS += \
  65. --enable-dh
  66. endif
  67. ifeq ($(CONFIG_CYASSL_HAS_ARC4),n)
  68. CONFIGURE_ARGS += \
  69. --disable-arc4
  70. endif
  71. ifeq ($(CONFIG_CYASSL_HAS_DES3),y)
  72. CONFIGURE_ARGS += \
  73. --disable-des3
  74. endif
  75. ifeq ($(CONFIG_CYASSL_HAS_PSK),y)
  76. CONFIGURE_ARGS += \
  77. --enable-psk
  78. endif
  79. ifeq ($(CONFIG_CYASSL_HAS_DTLS),y)
  80. CONFIGURE_ARGS += \
  81. --enable-dtls
  82. endif
  83. ifeq ($(CONFIG_CYASSL_HAS_ECC25519),y)
  84. CONFIGURE_ARGS += \
  85. --enable-ecc25519
  86. endif
  87. ifeq ($(CONFIG_CYASSL_HAS_POLY1305),y)
  88. CONFIGURE_ARGS += \
  89. --enable-poly1305
  90. endif
  91. #ifneq ($(CONFIG_TARGET_x86),)
  92. # CONFIGURE_ARGS += --enable-intelasm
  93. #endif
  94. #ifneq ($(CONFIG_TARGET_x86_64),)
  95. # CONFIGURE_ARGS += --enable-intelasm
  96. #endif
  97. define Build/InstallDev
  98. $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
  99. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  100. $(INSTALL_DIR) $(1)/usr/lib
  101. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.{so*,la} $(1)/usr/lib/
  102. ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
  103. ln -s libwolfssl.la $(1)/usr/lib/libcyassl.la
  104. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  105. endef
  106. define Package/libcyassl/install
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwolfssl.so* $(1)/usr/lib/
  109. ln -s libwolfssl.so $(1)/usr/lib/libcyassl.so
  110. endef
  111. $(eval $(call BuildPackage,libcyassl))