Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.5.1
  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_HASH:=312f020006f0d8e9ede3ed8e73d907a629baf6475229703941769372ab0adee2
  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. TARGET_CFLAGS += -ffunction-sections -fdata-sections
  41. CMAKE_OPTIONS += \
  42. -DCMAKE_BUILD_TYPE:String="Release" \
  43. -DUSE_SHARED_MBEDTLS_LIBRARY:Bool=ON \
  44. -DENABLE_TESTING:Bool=OFF \
  45. -DENABLE_PROGRAMS:Bool=OFF \
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/include
  48. $(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
  52. endef
  53. define Package/libmbedtls/install
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  56. endef
  57. $(eval $(call BuildPackage,libmbedtls))