Makefile revision 659
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews###############################################################################
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use subject to license terms.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# copy of this software and associated documentation files (the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# "Software"), to deal in the Software without restriction, including
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# without limitation the rights to use, copy, modify, merge, publish,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# distribute, and/or sell copies of the Software, and to permit persons
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to whom the Software is furnished to do so, provided that the above
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# copyright notice(s) and this permission notice appear in all copies of
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the Software and that both the above copyright notice(s) and this
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# permission notice appear in supporting documentation.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User# Except as contained in this notice, the name of a copyright holder
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# shall not be used in advertising or otherwise to promote the sale, use
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or other dealings in this Software without prior written authorization
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# of the copyright holder.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# @(#)Makefile 1.12 09/03/04
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# Package name used in tarballs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Version number (used in path names)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Directory created by unpacking source
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Source tarball
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_TARBALL_NAME=MesaDemos-$(MODULE_VERSION).tar.bz2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Download site for source
97e74139b19368e385a3564746d42db70879195eAutomatic UpdaterSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
43b94483957d3168796a816ed86cf097518817dcTinderbox User# Patches to apply to source after unpacking, in order
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Binaries built in tree
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGLXGEARS_BIN=$(SOURCE_DIR)/progs/xdemos/glxgears
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# configure script is run in ../lib/mesa build, just link to results here
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# What to build
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_TARGETS_i386=$(GLXGEARS_BIN) $(GLXINFO_BIN)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# What to install
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterINSTALL_TARGETS_i386=install_glxgears install_glxinfo install_man
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterINSTALL_TARGETS= $(INSTALL_TARGETS_$(MACH))
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater### Include common rulesets
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater### Rules specific to this directory:
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# Only care about building X demos
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterDEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR)
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# Workaround 6724478 libc printf should not SEGV when passed NULL for %s format
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterDEMO_LDFLAGS += /usr/lib$(ARCHLIBSUBDIR)/0@0.so.1
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# Flags passed on make command line when building
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic UpdaterMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater# Use configuration generated by Mesa library build
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater$(SOURCE_DIR)/configs/current: $(UNPACK_TARGET)
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater $(LNDIR) ../../../../../lib/mesa/$(SOURCE_DIR)/configs)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater# Build Mesa demos
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# For testing - we don't ship the rest of these
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater $(MAKE) $(MAKEFLAGS) $(BUILD_32_FLAGS) all-xdemos_gen
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf $(GLXGEARS_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1