Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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:= zlib
  5. PKG_VERSION:= 1.2.5
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= be1e89810e66150f5b0327984d8625a0
  8. PKG_DESCR:= implementation of the deflate compression method
  9. PKG_SECTION:= libs
  10. PKG_URL:= http://www.zlib.net
  11. PKG_SITES:= http://www.zlib.net/ \
  12. ${MASTER_SITE_SOURCEFORGE:=zlib/}
  13. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  14. ifeq ($(ADK_STATIC),y)
  15. PKG_OPTS:= libonly
  16. endif
  17. include ${TOPDIR}/mk/package.mk
  18. $(eval $(call PKG_template,ZLIB,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  19. $(eval $(call PKG_template,ZLIB_DEV,${PKG_NAME}-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  20. SUB_INSTALLS-y:=
  21. SUB_INSTALLS-m:=
  22. SUB_INSTALLS-${ADK_PACKAGE_ZLIB_DEV}+= zlib-dev-install
  23. CONFIG_STYLE:= manual
  24. ifeq ($(ADK_NATIVE),)
  25. COPTS:= $(TARGET_CONFIGURE_OPTS)
  26. endif
  27. ifeq ($(ADK_STATIC),)
  28. CONFIGURE_OPTS:= --shared
  29. endif
  30. do-configure:
  31. (cd $(WRKBUILD); $(COPTS) \
  32. CFLAGS="$(TARGET_CFLAGS) -fPIC" \
  33. CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
  34. LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
  35. ./configure \
  36. --prefix=/usr \
  37. $(CONFIGURE_OPTS) \
  38. );
  39. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  40. ${INSTALL_DIR} ${IDIR_ZLIB}/usr/lib
  41. ${CP} ${WRKBUILD}/libz.so* ${IDIR_ZLIB}/usr/lib
  42. zlib-dev-install:
  43. ${INSTALL_DIR} ${IDIR_ZLIB_DEV}/usr/include
  44. ${CP} ${WRKBUILD}/*.h ${IDIR_ZLIB_DEV}/usr/include
  45. include ${TOPDIR}/mk/pkg-bottom.mk