1
0

Makefile 1.9 KB

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