Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= openssl
  5. PKG_VERSION:= 1.0.0d
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 40b6ea380cc8a5bf9734c2f8bf7e701e
  8. PKG_DESCR:= OpenSSL (Secure Socket Layer) libraries
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= zlib
  11. PKG_BUILDDEP:= zlib
  12. PKG_URL:= http://www.openssl.org/
  13. PKG_SITES:= http://www.openssl.org/source/
  14. PKG_SUBPKGS:= LIBOPENSSL LIBOPENSSL_DEV OPENSSL_UTIL
  15. PKGSD_OPENSSL_UTIL:= OpenSSL command line tool
  16. PKGSC_OPENSSL_UTIL:= crypto
  17. PKGSS_OPENSSL_UTIL:= libopenssl
  18. PKGSD_LIBOPENSSL_DEV:= development files for openssl
  19. PKGSC_LIBOPENSSL_DEV:= devel
  20. PKGSS_LIBOPENSSL_DEV:= libopenssl
  21. PKG_FLAVOURS_LIBOPENSSL:= WITH_EC
  22. PKGFD_WITH_EC:= enable Elliptic Curve crypto
  23. ifeq ($(ADK_STATIC),y)
  24. PKG_OPTS:= libonly
  25. endif
  26. include ${TOPDIR}/mk/package.mk
  27. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},$(PKG_OPTS)))
  28. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBOPENSSL_DEV},${PKGSD_LIBOPENSSL_DEV},${PKGSC_LIBOPENSSL_DEV}))
  29. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSL_UTIL},${PKGSD_OPENSSL_UTIL},${PKGSC_OPENSSL_UTIL}))
  30. CONFIG_STYLE:= manual
  31. BUILD_STYLE:= manual
  32. INSTALL_TARGET:= install_sw
  33. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  34. OPENSSL_OPTIONS:= shared no-err no-krb5 no-threads zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast
  35. ifeq ($(ADK_PACKAGE_LIBOPENSSL_WITH_EC),)
  36. OPENSSL_OPTIONS+= no-ec
  37. endif
  38. do-configure:
  39. (cd $(WRKBUILD); \
  40. PATH=$(TARGET_PATH) \
  41. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  42. ./Configure linux-embedded \
  43. --prefix=/usr \
  44. --openssldir=/etc/ssl \
  45. -I$(STAGING_TARGET_DIR)/usr/include \
  46. -L$(STAGING_TARGET_DIR)/usr/lib -ldl \
  47. -DHAVE_CRYPTODEV \
  48. -DOPENSSL_SMALL_FOOTPRINT \
  49. $(OPENSSL_OPTIONS) \
  50. );
  51. do-build:
  52. $(MAKE) -C $(WRKBUILD) \
  53. CC="$(TARGET_CC)" \
  54. AR="$(TARGET_CROSS)ar r" \
  55. RANLIB="$(TARGET_CROSS)ranlib" \
  56. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  57. all build-shared
  58. post-install:
  59. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  60. ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  61. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  62. openssl-util-install:
  63. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  64. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  65. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  66. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  67. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  68. libopenssl-dev-install:
  69. ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include
  70. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include
  71. $(CP) $(STAGING_TARGET_DIR)/usr/include/crypto/cryptodev.h \
  72. $(IDIR_LIBOPENSSL_DEV)/usr/include
  73. include ${TOPDIR}/mk/pkg-bottom.mk