Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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:=1.3.11
  10. PKG_RELEASE:=2
  11. PKG_USE_MIPS16:=0
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
  13. PKG_SOURCE_URL:=https://polarssl.org/download/
  14. PKG_MD5SUM:=c02ce2e54862d678604794ee484fb59e
  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/polarssl/Default
  20. SUBMENU:=SSL
  21. TITLE:=Embedded SSL
  22. URL:=http://polarssl.org/
  23. endef
  24. define Package/polarssl/Default/description
  25. The aim of the PolarSSL project is to provide a quality, open-source
  26. cryptographic library written in C and targeted at embedded systems.
  27. endef
  28. define Package/libpolarssl
  29. $(call Package/polarssl/Default)
  30. SECTION:=libs
  31. CATEGORY:=Libraries
  32. TITLE+= (library)
  33. ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
  34. endef
  35. define Package/libpolarssl/description
  36. $(call Package/polarssl/Default/description)
  37. This package contains the PolarSSL 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/polarssl $(1)/usr/include/
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbedtls.so.* $(1)/usr/lib/
  50. $(LN) libmbedtls.so.$(PKG_VERSION) $(1)/usr/lib/libpolarssl.so
  51. endef
  52. define Package/libpolarssl/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmbedtls.so.* $(1)/usr/lib/
  55. $(LN) libmbedtls.so.$(PKG_VERSION) $(1)/usr/lib/libpolarssl.so
  56. endef
  57. $(eval $(call BuildPackage,libpolarssl))