Makefile 2.9 KB

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