# Script to choose which configurations are to be built depending on the value
# of the DEB_BUILD_ARCH variable.
#
# Copyright © 2006 Thierry Reding <thierry@gilfi.de>

##############################################################################
## architecture-specific configurations ######################################

# choose an architecture-specific build of swx11 and GLU if a matching
# configuration exists
ifneq ($(wildcard configs/debian-swx11+glu-$(DEB_BUILD_ARCH)),)
	SWX11_GLU_CONFIGS := debian-swx11+glu-$(DEB_BUILD_ARCH)
else
	SWX11_GLU_CONFIGS := debian-swx11+glu-any
endif

# same for static builds
ifneq ($(wildcard configs/debian-swx11+glu-static-$(DEB_BUILD_ARCH)),)
	SWX11_GLU_CONFIGS += debian-swx11+glu-static-$(DEB_BUILD_ARCH)
else
	SWX11_GLU_CONFIGS += debian-swx11+glu-static-any
endif

# and for the GLX/DRI-enabled libGL
ifneq ($(wildcard configs/debian-indirect-$(DEB_BUILD_ARCH)),)
	DRI_CONFIGS := debian-indirect-$(DEB_BUILD_ARCH)
else
  ifneq ($(wildcard configs/debian-dri-$(DEB_BUILD_ARCH)),)
	DRI_CONFIGS := debian-dri-$(DEB_BUILD_ARCH)
  else
	DRI_CONFIGS := debian-dri-any
  endif
endif

##############################################################################
## CPU-optimized configurations ##############################################

ifeq ($(DEB_BUILD_ARCH), i386)
	SWX11_GLU_CONFIGS += debian-swx11+glu-i386-i686
#	DRI_CONFIGS += debian-dri-i386-i686
endif

#ifeq ($(DEB_BUILD_ARCH), alpha)
#	SWX11_GLU_CONFIGS += debian-swx11+glu-alpha-ev5
#endif

#ifeq ($(DEB_BUILD_ARCH), powerpc)
#	SWX11_GLU_CONFIGS += debian-swx11+glu-powerpc-603
#endif

#ifeq ($(DEB_BUILD_ARCH), sparc)
#	SWX11_GLU_CONFIGS += debian-swx11+glu-sparc-ultrasparc
#endif

# vim: ft=make

