1
0

Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= bzip2
  5. PKG_VERSION:= 1.0.6
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= 00b516f4704d4a7cb50a1d97e6e8e15b
  8. PKG_DESCR:= compression utility
  9. PKG_SECTION:= app/archive
  10. PKG_BUILDDEP:= bzip2-host
  11. PKG_DEPENDS:= libbz2
  12. PKG_URL:= http://www.bzip.org/
  13. PKG_SITES:= http://www.bzip.org/${PKG_VERSION}/
  14. PKG_LIBNAME:= libbz2
  15. PKG_OPTS:= dev
  16. PKG_BB:= 1
  17. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz
  18. PKG_SUBPKGS:= BZIP2 LIBBZ2
  19. PKGSD_LIBBZ2:= bzip2 compression library
  20. PKGSC_LIBBZ2:= libs/misc
  21. include ${ADK_TOPDIR}/mk/host.mk
  22. include ${ADK_TOPDIR}/mk/package.mk
  23. $(eval $(call HOST_template,BZIP2,bzip2,${PKG_VERSION}-${PKG_RELEASE}))
  24. $(eval $(call PKG_template,BZIP2,bzip2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  25. $(eval $(call PKG_template,LIBBZ2,libbz2,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LIBBZ2},${PKGSC_LIBBZ2},${PKG_OPTS}))
  26. HOST_STYLE:= manual
  27. HOST_MAKE_FILE:= Makefile
  28. ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
  29. MAKE_FILE:= Makefile-libbz2_so
  30. BIN_FILE:= bzip2-shared
  31. else
  32. BIN_FILE:= bzip2
  33. endif
  34. CONFIG_STYLE:= manual
  35. TARGET_CFLAGS+= -fPIC
  36. XAKE_FLAGS+= PREFIX=${WRKINST}/usr CROSS_COMPILE=1
  37. INSTALL_STYLE:= manual
  38. host-build:
  39. (cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${HOST_MAKE_FILE} \
  40. PREFIX=${HOST_WRKINST}/usr ${HOST_ALL_TARGET})
  41. bzip2-hostinstall:
  42. ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
  43. $(INSTALL_BIN) ${WRKBUILD}/bzip2 ${STAGING_HOST_DIR}/usr/bin/bzip2
  44. libbz2-install:
  45. ${INSTALL_DIR} ${IDIR_LIBBZ2}/usr/lib
  46. $(CP) ${WRKBUILD}/libbz2.so* \
  47. ${IDIR_LIBBZ2}/usr/lib
  48. $(CP) ${WRKBUILD}/libbz2.so* \
  49. ${STAGING_TARGET_DIR}/usr/lib
  50. (cd ${STAGING_TARGET_DIR}/usr/lib; ln -sf libbz2.so.1.0.6 libbz2.so)
  51. $(CP) $(WRKBUILD)/bzlib.h $(STAGING_TARGET_DIR)/usr/include
  52. ${INSTALL_DIR} $(IDIR_LIBBZ2_DEV)/usr/include
  53. $(CP) $(WRKBUILD)/bzlib.h $(IDIR_LIBBZ2_DEV)/usr/include
  54. bzip2-install:
  55. ${INSTALL_DIR} ${IDIR_BZIP2}/usr/bin
  56. ${INSTALL_BIN} ${WRKBUILD}/$(BIN_FILE) ${IDIR_BZIP2}/usr/bin/bzip2
  57. include ${ADK_TOPDIR}/mk/host-bottom.mk
  58. include ${ADK_TOPDIR}/mk/pkg-bottom.mk