Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.1f
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= f26b09c028a0541cab33da697d522b25
  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_LIBNAME:= libopenssl
  15. PKG_OPTS:= dev
  16. PKG_SUBPKGS:= LIBOPENSSL OPENSSL_UTIL
  17. PKGSD_OPENSSL_UTIL:= OpenSSL command line tool
  18. PKGSC_OPENSSL_UTIL:= crypto
  19. PKGSS_OPENSSL_UTIL:= libopenssl
  20. PKG_FLAVOURS_LIBOPENSSL:= WITH_CRYPTODEV
  21. PKGFD_WITH_CRYPTODEV:= enable support for cryptodev-linux
  22. ifeq ($(ADK_STATIC),y)
  23. PKG_OPTS+= libmix
  24. endif
  25. include ${TOPDIR}/mk/package.mk
  26. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},$(PKG_OPTS)))
  27. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSL_UTIL},${PKGSD_OPENSSL_UTIL},${PKGSC_OPENSSL_UTIL}))
  28. CONFIG_STYLE:= manual
  29. BUILD_STYLE:= manual
  30. INSTALL_TARGET:= install_sw
  31. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  32. OPENSSL_OPTIONS:= shared threads no-err no-krb5 zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast
  33. ifneq ($(ADK_PACKAGE_LIBOPENSSL_WITH_CRYPTODEV),)
  34. OPENSSL_OPTIONS+= -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
  35. endif
  36. ifeq ($(ADK_LINUX_MICROBLAZE),y)
  37. TARGET_CFLAGS:= $(subst g3,g,$(TARGET_CFLAGS))
  38. endif
  39. ifeq ($(ADK_LINUX_X86_64),y)
  40. CONFIG:= linux-embedded-x86_64
  41. TARGET_CFLAGS:= $(subst g3,g,$(TARGET_CFLAGS))
  42. else
  43. CONFIG:= linux-embedded
  44. endif
  45. post-extract:
  46. -mkdir -p $(STAGING_TARGET_DIR)/usr/include/crypto
  47. cp ./files/cryptodev.h $(STAGING_TARGET_DIR)/usr/include/crypto/
  48. do-configure:
  49. (cd $(WRKBUILD); \
  50. PATH='$(TARGET_PATH)' \
  51. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  52. ./Configure $(CONFIG) \
  53. --prefix=/usr \
  54. --openssldir=/etc/ssl \
  55. -I$(STAGING_TARGET_DIR)/usr/include \
  56. -L$(STAGING_TARGET_DIR)/usr/lib -ldl \
  57. -DOPENSSL_SMALL_FOOTPRINT \
  58. $(OPENSSL_OPTIONS) \
  59. );
  60. do-build:
  61. $(MAKE) -C $(WRKBUILD) \
  62. CC="$(TARGET_CC)" \
  63. AR="$(TARGET_CROSS)ar r" \
  64. RANLIB="$(TARGET_CROSS)ranlib" \
  65. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  66. all build-shared
  67. libopenssl-install:
  68. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  69. ${CP} ${WRKINST}/usr/lib*/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  70. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  71. openssl-util-install:
  72. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  73. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  74. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  75. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  76. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  77. include ${TOPDIR}/mk/pkg-bottom.mk