Makefile 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.0a
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= e3873edfffc783624cfbdb65e2249cbd
  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_DESCR_UTIL:= OpenSSL command line tool
  15. PKG_SECTION_UTIL:= crypto
  16. PKG_DEPENDS_UTIL:= libopenssl
  17. PKG_DESCR_DEV:= development files for openssl
  18. PKG_SECTION_DEV:= devel
  19. PKG_DEPENDS_DEV:= libopenssl
  20. PKG_FLAVOURS:= WITH_EC
  21. PKGFD_WITH_EC:= enable Elliptic Curve crypto
  22. PKGSUB_WITH_EC:= libopenssl
  23. include ${TOPDIR}/mk/package.mk
  24. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  25. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_DEV},${PKG_DESCR_DEV},${PKG_SECTION_DEV}))
  26. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_UTIL},${PKG_DESCR_UTIL},${PKG_SECTION_UTIL}))
  27. SUB_INSTALLS-y:=
  28. SUB_INSTALLS-m:=
  29. SUB_INSTALLS-${ADK_PACKAGE_LIBOPENSSL_DEV}+= libopenssl-dev-install
  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_OPENSSL_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_DIR)/usr/include \
  46. -L$(STAGING_DIR)/usr/lib -ldl \
  47. -DOPENSSL_SMALL_FOOTPRINT \
  48. $(OPENSSL_OPTIONS) \
  49. );
  50. do-build:
  51. $(MAKE) -C $(WRKBUILD) \
  52. MAKEDEPPROG="$(TARGET_CC)" \
  53. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  54. depend
  55. $(MAKE) -C $(WRKBUILD) \
  56. CC="$(TARGET_CC)" \
  57. AR="$(TARGET_CROSS)ar r" \
  58. RANLIB="$(TARGET_CROSS)ranlib" \
  59. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  60. all build-shared
  61. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  62. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  63. ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  64. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  65. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  66. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  67. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  68. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  69. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  70. libopenssl-dev-install:
  71. ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include
  72. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include
  73. include ${TOPDIR}/mk/pkg-bottom.mk