Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #
  2. # Copyright (C) 2011-2015 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:=mbedtls
  9. PKG_VERSION:=2.3.0
  10. PKG_RELEASE:=2
  11. PKG_USE_MIPS16:=0
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
  13. PKG_SOURCE_URL:=https://tls.mbed.org/download/
  14. PKG_MD5SUM:=21237014f779bde70b2d71399cc1ea53365eb7f10cdd74a13ee6329a1910cb49
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_LICENSE:=GPL-2.0+
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/mbedtls/Default
  20. SUBMENU:=SSL
  21. TITLE:=Embedded SSL
  22. URL:=https://tls.mbed.org
  23. endef
  24. define Package/mbedtls/Default/description
  25. The aim of the mbedtls project is to provide a quality, open-source
  26. cryptographic library written in C and targeted at embedded systems.
  27. endef
  28. define Package/libmbedtls
  29. $(call Package/mbedtls/Default)
  30. SECTION:=libs
  31. CATEGORY:=Libraries
  32. TITLE+= (library)
  33. ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
  34. endef
  35. define Package/libmbedtls/description
  36. $(call Package/mbedtls/Default/description)
  37. This package contains the mbedtls library.
  38. endef
  39. PKG_INSTALL:=1
  40. CMAKE_OPTIONS += \
  41. -DCMAKE_BUILD_TYPE:String="Release" \
  42. -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
  43. -DENABLE_TESTING:Bool=OFF \
  44. -DENABLE_PROGRAMS:Bool=OFF \
  45. define Build/InstallDev
  46. $(INSTALL_DIR) $(1)/usr/include
  47. $(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  50. endef
  51. define Package/libmbedtls/install
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  54. endef
  55. $(eval $(call BuildPackage,libmbedtls))