Makefile 2.1 KB

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