Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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:= MesaLib
  5. PKG_VERSION:= 7.8.2
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= c89b63d253605ed40e8ac370d25a833c
  8. PKG_DESCR:= MESA library
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libxdamage libxfixes libdrm libxxf86vm
  11. PKG_BUILDDEP:= libXdamage libXfixes libXxf86vm libdrm
  12. PKG_BUILDDEP+= dri2proto glproto expat
  13. PKG_URL:= http://www.mesa3d.org/
  14. PKG_SITES:= ftp://ftp.freedesktop.org/pub/mesa/7.8.2/
  15. PKG_SUBPKGS:= MESALIB GLXINFO GLXGEARS
  16. PKGSD_GLXINFO:= Display various GLX information
  17. PKGSC_GLXINFO:= x11/apps
  18. PKGSD_GLXGEARS:= Nice little OpenGL demo application
  19. PKGSC_GLXGEARS:= x11/apps
  20. PKG_ARCH_DEPENDS:= x86 x86_64 mips mipsel mips64 mips64el
  21. WRKDIST= ${WRKDIR}/Mesa-${PKG_VERSION}
  22. include $(TOPDIR)/mk/package.mk
  23. $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  24. $(eval $(call PKG_template,GLXINFO,glxinfo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLXINFO},${PKGSC_GLXINFO}))
  25. $(eval $(call PKG_template,GLXGEARS,glxgears,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLXGEARS},${PKGSC_GLXGEARS}))
  26. ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
  27. DRI_DRIVERS:=i915
  28. endif
  29. CONFIGURE_ARGS+= --disable-static \
  30. --disable-gallium \
  31. --disable-glw \
  32. --with-driver=dri \
  33. --with-dri-drivers=${DRI_DRIVERS},swrast \
  34. --with-demos=xdemos
  35. XAKE_FLAGS+= HOST_CC=${CC_FOR_BUILD} GLSL_CL=${STAGING_HOST_DIR}/bin/glslcompile
  36. post-extract:
  37. (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  38. ./configure \
  39. --disable-static \
  40. --disable-glw \
  41. --disable-gallium \
  42. --with-driver=xlib \
  43. );
  44. ${MAKE} -C ${WRKBUILD}/src/glsl
  45. ${MAKE} -C ${WRKBUILD}/src/glsl/apps
  46. ${CP} ${WRKBUILD}/src/glsl/apps/compile \
  47. ${STAGING_HOST_DIR}/bin/glslcompile
  48. ${MAKE} -C ${WRKBUILD}/src/glsl clean
  49. pre-configure:
  50. $(SED) "s#@@RANLIB@@#${TARGET_CROSS}ranlib#" ${WRKBUILD}/configs/default
  51. $(SED) "s#@@AR@@#${TARGET_CROSS}ar#" ${WRKBUILD}/configs/default
  52. post-install:
  53. $(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri
  54. $(CP) $(WRKINST)/usr/lib/libGL*.so* \
  55. $(IDIR_MESALIB)/usr/lib
  56. ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
  57. ${CP} $(WRKINST)/usr/lib/dri/i915_dri.so \
  58. ${IDIR_MESALIB}/usr/lib/dri/
  59. endif
  60. ${CP} $(WRKINST)/usr/lib/dri/swrast_dri.so \
  61. ${IDIR_MESALIB}/usr/lib/dri/
  62. ${INSTALL_DIR} ${IDIR_GLXINFO}/usr/bin
  63. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxinfo \
  64. ${IDIR_GLXINFO}/usr/bin/
  65. ${INSTALL_DIR} ${IDIR_GLXGEARS}/usr/bin
  66. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxgears \
  67. ${IDIR_GLXGEARS}/usr/bin/
  68. include ${TOPDIR}/mk/pkg-bottom.mk