Makefile 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_NEED_CXX:= 1
  16. PKG_SUBPKGS:= MESALIB MESALIB_DEV GLXINFO GLXGEARS
  17. PKGSD_MESALIB_DEV:= MESA headers
  18. PKGSC_MESALIB_DEV:= devel
  19. PKGSD_GLXINFO:= Display various GLX information
  20. PKGSC_GLXINFO:= x11/apps
  21. PKGSD_GLXGEARS:= Nice little OpenGL demo application
  22. PKGSC_GLXGEARS:= x11/apps
  23. PKG_ARCH_DEPENDS:= x86 x86_64 mips mipsel mips64 mips64el
  24. WRKDIST= ${WRKDIR}/Mesa-${PKG_VERSION}
  25. include $(TOPDIR)/mk/package.mk
  26. $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  27. $(eval $(call PKG_template,MESALIB_DEV,mesalib-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_MESALIB_DEV},${PKGSC_MESALIB_DEV}))
  28. $(eval $(call PKG_template,GLXINFO,glxinfo,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLXINFO},${PKGSC_GLXINFO}))
  29. $(eval $(call PKG_template,GLXGEARS,glxgears,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GLXGEARS},${PKGSC_GLXGEARS}))
  30. ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
  31. DRI_DRIVERS:=i915
  32. endif
  33. CONFIGURE_ARGS+= --disable-static \
  34. --disable-gallium \
  35. --disable-glw \
  36. --with-driver=dri \
  37. --with-dri-drivers=${DRI_DRIVERS},swrast \
  38. --with-demos=xdemos
  39. XAKE_FLAGS+= HOST_CC=${CC_FOR_BUILD} GLSL_CL=${STAGING_HOST_DIR}/bin/glslcompile
  40. ifeq ($(ADK_NATIVE),y)
  41. XAKE_FLAGS+= RANLIB=ranlib AR=ar
  42. endif
  43. post-extract:
  44. (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  45. ./configure \
  46. --disable-static \
  47. --disable-glw \
  48. --disable-gallium \
  49. --with-driver=xlib \
  50. );
  51. ${MAKE} -C ${WRKBUILD}/src/glsl
  52. ${MAKE} -C ${WRKBUILD}/src/glsl/apps
  53. ${CP} ${WRKBUILD}/src/glsl/apps/compile \
  54. ${STAGING_HOST_DIR}/bin/glslcompile
  55. ${MAKE} -C ${WRKBUILD}/src/glsl clean
  56. mesalib-install:
  57. $(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri
  58. $(CP) $(WRKINST)/usr/lib/libGL*.so* \
  59. $(IDIR_MESALIB)/usr/lib
  60. ${CP} $(WRKINST)/usr/lib/dri/swrast_dri.so \
  61. ${IDIR_MESALIB}/usr/lib/dri/
  62. ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
  63. ${CP} $(WRKINST)/usr/lib/dri/i915_dri.so \
  64. ${IDIR_MESALIB}/usr/lib/dri/
  65. endif
  66. glxinfo-install:
  67. ${INSTALL_DIR} ${IDIR_GLXINFO}/usr/bin
  68. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxinfo \
  69. ${IDIR_GLXINFO}/usr/bin/
  70. glxgears-install:
  71. ${INSTALL_DIR} ${IDIR_GLXGEARS}/usr/bin
  72. ${INSTALL_BIN} ${WRKBUILD}/progs/xdemos/glxgears \
  73. ${IDIR_GLXGEARS}/usr/bin/
  74. mesalib-dev-install:
  75. $(INSTALL_DIR) $(IDIR_MESALIB_DEV)/usr/include
  76. ${CP} ${WRKINST}/usr/include/* \
  77. $(IDIR_MESALIB_DEV)/usr/include
  78. $(INSTALL_DIR) $(IDIR_MESALIB_DEV)/usr/lib/pkgconfig
  79. ${CP} ${WRKINST}/usr/lib/pkgconfig/*.pc \
  80. $(IDIR_MESALIB_DEV)/usr/lib/pkgconfig
  81. include ${TOPDIR}/mk/pkg-bottom.mk