Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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:= 8.0.5
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= cda5d101f43b8784fa60bdeaca4056f2
  8. PKG_DESCR:= MESA library
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libxdamage libxfixes libdrm libxxf86vm libexpat
  11. PKG_BUILDDEP:= libXdamage libXfixes libXxf86vm libdrm
  12. PKG_BUILDDEP+= dri2proto glproto expat libXext
  13. PKG_URL:= http://www.mesa3d.org/
  14. PKG_SITES:= ftp://ftp.freedesktop.org/pub/mesa/${PKG_VERSION}/
  15. PKG_NEED_CXX:= 1
  16. PKG_LIBNAME:= mesalib
  17. PKG_OPTS:= dev
  18. PKG_ARCH_DEPENDS:= x86 x86_64 mips mipsel mips64 mips64el arm
  19. WRKDIST= ${WRKDIR}/Mesa-${PKG_VERSION}
  20. include $(TOPDIR)/mk/package.mk
  21. $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  22. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  23. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  24. ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
  25. DRI_DRIVERS:=i915
  26. endif
  27. CONFIGURE_ARGS+= --disable-static \
  28. --disable-gallium-llvm \
  29. --with-gallium-drivers=swrast \
  30. --with-driver=dri \
  31. --disable-gles1 \
  32. --disable-gles2 \
  33. --with-dri-drivers=${DRI_DRIVERS},swrast
  34. CONFIGURE_ENV+= PYTHON2=/usr/bin/python
  35. XAKE_FLAGS+= HOST_CC=${CC_FOR_BUILD} GLSL_CL=${STAGING_HOST_DIR}/bin/glslcompile
  36. ifeq ($(ADK_NATIVE),y)
  37. XAKE_FLAGS+= RANLIB=ranlib AR=ar
  38. endif
  39. post-extract:
  40. (cd ${WRKBUILD}; rm -rf config.{cache,status}; \
  41. ./configure \
  42. --disable-static \
  43. --disable-gallium-llvm \
  44. --with-gallium-drivers=swrast \
  45. --with-driver=xlib \
  46. );
  47. ${MAKE} -C ${WRKBUILD}/src/glsl
  48. ${CP} ${WRKBUILD}/src/glsl/glsl_compiler \
  49. ${STAGING_HOST_DIR}/bin/glsl_compiler
  50. ${CP} ${WRKBUILD}/src/glsl/builtin_compiler \
  51. ${STAGING_HOST_DIR}/bin/builtin_compiler
  52. ${MAKE} -C ${WRKBUILD}/src/glsl clean
  53. mesalib-install:
  54. $(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib/dri
  55. $(CP) $(WRKINST)/usr/lib/libGL*.so* \
  56. $(IDIR_MESALIB)/usr/lib
  57. ${CP} $(WRKINST)/usr/lib/dri/swrast_dri.so \
  58. ${IDIR_MESALIB}/usr/lib/dri/
  59. ifeq (${ADK_TARGET_SYSTEM_IBM_X40},y)
  60. ${CP} $(WRKINST)/usr/lib/dri/i915_dri.so \
  61. ${IDIR_MESALIB}/usr/lib/dri/
  62. endif
  63. include ${TOPDIR}/mk/pkg-bottom.mk