Makefile revision 156
5cd4555ad444fd391002ae32450572054369fd42Rob Austein###############################################################################
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt#
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Use subject to license terms.
b129f72d951663755496670606e5f7303e8f2dc2Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# copy of this software and associated documentation files (the
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# "Software"), to deal in the Software without restriction, including
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# without limitation the rights to use, copy, modify, merge, publish,
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# distribute, and/or sell copies of the Software, and to permit persons
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# to whom the Software is furnished to do so, provided that the above
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# copyright notice(s) and this permission notice appear in all copies of
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# the Software and that both the above copyright notice(s) and this
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# permission notice appear in supporting documentation.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2f5461d23b4044b62d4d668732611909d902e54dJeremy C. Reed# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# Except as contained in this notice, the name of a copyright holder
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# shall not be used in advertising or otherwise to promote the sale, use
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# or other dealings in this Software without prior written authorization
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# of the copyright holder.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# @(#)Makefile 1.5 07/05/15
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyPWD:sh=pwd
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyTOP=$(PWD)/../..
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Version number (used in path names)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinMESA_VERS=6.5.2
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Source tarball
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark AndrewsSOURCE_TARBALL_NAME=MesaDemos-$(MESA_VERS).tar.bz2
cfa2326b5c96a3a4c720262e077b2baf9fc27970Tinderbox User
81f58902eb5a1c1ab22742c72bd6cf318acbc06aTinderbox User# Download site for source
b129f72d951663755496670606e5f7303e8f2dc2Tinderbox UserSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinSOURCE_URL_SET=yes
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Patches to apply to source after unpacking, in order
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinSOURCE_PATCHES= \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein null-display.patch \
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews Xorg-6.9-changes.patch
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Directory created by unpacking source
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinSOURCE_DIR=$(BUILD_DIR)/Mesa-$(MESA_VERS)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# Binaries built in tree
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark AndrewsGLXINFO_BIN=$(SOURCE_DIR)/progs/xdemos/glxinfo
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
a769eca4e3b223866b01dc8f7a4dde8d9e49bab0Mark Andrews# Where to install files
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyMESA_prefix=$(PROTODIR)/usr/X11
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
431859b442e89281a0d42652200a8de0668bc6b9Evan Hunt# What to build
b435b1ded3def3159f597953d21dffc1615cb250Brian WellingtonBUILD_TARGETS=$(GLXGEARS_BIN) $(GLXINFO_BIN)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
9b6a170d22d61026d31bde87523f3320628b6ebcBrian Wellington### Include common rulesets
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleyinclude $(TOP)/common/Makefile.inc
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley### Rules specific to this directory:
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# Merge in additional sources from Mesa library sun-src directory
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinsource_gen:: $(LNDIR)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein mkdir -p $(SOURCE_DIR)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (cd $(SOURCE_DIR) && $(LNDIR) ../../../../lib/mesa/sun-src)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (cd $(SOURCE_DIR)/configs && touch default)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Only care about building X demos
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinDEMOS_DIR=$(SOURCE_DIR)/progs/xdemos
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# Mesa config file names
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinMESA_CFG_32_sparc=sunos5-v8
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntMESA_CFG_64_sparc=sunos5-v9
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntMESA_CFG_32_i386=solaris-x86-cc-dri
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntMESA_CFG_64_i386=solaris-x64-cc-dri
122c58bd11790c7576cdb1c6fd8e4439d0d7f7a5Mark Andrews
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntMESA_CFG_32= $(MESA_CFG_32_$(MACH))
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntMESA_CFG_64= $(MESA_CFG_64_$(MACH))
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntBUILD_32_FLAGS= MESA_CFG=$(MESA_CFG_32)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinBUILD_64_FLAGS= MESA_CFG=$(MESA_CFG_64)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Build Mesa demos
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(GLXGEARS_BIN): $(UNPACK_TARGET)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)" glxgears )
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein$(GLXINFO_BIN): $(UNPACK_TARGET)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)" glxinfo )
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# For testing - we don't ship the rest of these
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleyall-xdemos_gen: $(UNPACK_TARGET)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley (cd $(DEMOS_DIR) && $(MAKE) $(MFLAGS) LDFLAGS="$(PROG_LDFLAGS)")
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrewsall-xdemos:
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt $(MAKE) $(MFLAGS) BUILD_DIR=$(BUILD_DIR_32) ARCH_FLAGS="$(ARCH32_FLAGS)" $(BUILD_32_FLAGS) all-xdemos_gen
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt
591389c7d44e5ca20c357627dd179772cfefaaccEvan Huntinstall_gen: $(GLXGEARS_BIN) $(GLXINFO_BIN)
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt cp -p $(GLXGEARS_BIN) $(GLXINFO_BIN) $(MESA_prefix)/bin
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt
591389c7d44e5ca20c357627dd179772cfefaaccEvan Hunt