Makefile 3.0 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.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_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:= WITH_EC
  22. PKGFD_WITH_EC:= enable Elliptic Curve crypto
  23. PKGSUB_WITH_EC:= libopenssl
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBOPENSSL_DEV},${PKGSD_LIBOPENSSL_DEV},${PKGSC_LIBOPENSSL_DEV}))
  27. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSL_UTIL},${PKGSD_OPENSSL_UTIL},${PKGSC_OPENSSL_UTIL}))
  28. SUB_INSTALLS-y:=
  29. SUB_INSTALLS-m:=
  30. SUB_INSTALLS-${ADK_PACKAGE_LIBOPENSSL_DEV}+= libopenssl-dev-install
  31. CONFIG_STYLE:= manual
  32. BUILD_STYLE:= manual
  33. INSTALL_TARGET:= install_sw
  34. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  35. 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
  36. ifeq ($(ADK_PACKAGE_OPENSSL_WITH_EC),)
  37. OPENSSL_OPTIONS+= no-ec
  38. endif
  39. do-configure:
  40. (cd $(WRKBUILD); \
  41. PATH=$(TARGET_PATH) \
  42. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  43. ./Configure linux-embedded \
  44. --prefix=/usr \
  45. --openssldir=/etc/ssl \
  46. -I$(STAGING_DIR)/usr/include \
  47. -L$(STAGING_DIR)/usr/lib -ldl \
  48. -DOPENSSL_SMALL_FOOTPRINT \
  49. $(OPENSSL_OPTIONS) \
  50. );
  51. do-build:
  52. $(MAKE) -C $(WRKBUILD) \
  53. MAKEDEPPROG="$(TARGET_CC)" \
  54. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  55. depend
  56. $(MAKE) -C $(WRKBUILD) \
  57. CC="$(TARGET_CC)" \
  58. AR="$(TARGET_CROSS)ar r" \
  59. RANLIB="$(TARGET_CROSS)ranlib" \
  60. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  61. all build-shared
  62. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  63. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  64. ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  65. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  66. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  67. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  68. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  69. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  70. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  71. libopenssl-dev-install:
  72. ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include
  73. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include
  74. include ${TOPDIR}/mk/pkg-bottom.mk