Makefile revision 286
9eb24f1f84885d5c2e51a7f675264db398c31af7Tinderbox User###############################################################################
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Use subject to license terms.
8cbf3b6fc35091abde426930f2eadb8f53476c98Evan Hunt# Permission is hereby granted, free of charge, to any person obtaining a
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid Lawrence# copy of this software and associated documentation files (the
74cb99072c4b0ebd2ccafcfa284288fa760f7a1aMark Andrews# "Software"), to deal in the Software without restriction, including
bff64bf12b58a6f80e740e94f2e42a32df18113aEvan Hunt# without limitation the rights to use, copy, modify, merge, publish,
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid Lawrence# distribute, and/or sell copies of the Software, and to permit persons
7c74e180c206e6ed99e8beb820da5f399d845c3eDavid Lawrence# to whom the Software is furnished to do so, provided that the above
2baa66562a2f119edffded961d3391f87ff98ec0Ondřej Surý# copyright notice(s) and this permission notice appear in all copies of
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# the Software and that both the above copyright notice(s) and this
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# permission notice appear in supporting documentation.
63dd46733010bb9622810faa17d88c3e3c28b730Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael Graff# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
d901b2252d664a5b96bae117416f8ee822dc6691Stephen Jacob# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20256cbc1570e344793555b8c2f43a25bb38e373Mark Andrews# Except as contained in this notice, the name of a copyright holder
8b56b8956fc1e6c70efacb4f71db28d0d1f0c577Mark Andrews# shall not be used in advertising or otherwise to promote the sale, use
8b56b8956fc1e6c70efacb4f71db28d0d1f0c577Mark Andrews# or other dealings in this Software without prior written authorization
f4ea363e3acc321b24ffe95a64a583e8041d6fd5Mark Andrews# of the copyright holder.
8b56b8956fc1e6c70efacb4f71db28d0d1f0c577Mark Andrews# @(#)Makefile 1.9 07/07/11
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael Graff# Build 32-bit, 64-bit, or both?
3d776d762914d1b675b4fd49728ce353ccf6f77eBrian Wellington# Version number (used in path names)
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael Graff# Source tarball
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark AndrewsSOURCE_TARBALL_NAME=MesaLib-$(MESA_VERS).tar.bz2
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark Andrews# Download site for source
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark AndrewsSOURCE_URL=$(SF_DOWNLOADS_URL)/mesa3d/$(SOURCE_TARBALL_NAME)
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark Andrews# Patches to apply to source after unpacking, in order
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# Directory created by unpacking source
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# Library built in tree
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews# Where to install most files
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews# Where to install libraries
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews# What to build
800cfc8a5ce9ffacfc076003b34b5f787f82c701Mark Andrews### Include common rulesets
740e7340c55e9f0cf80c6fbbf7e8d3c1bdeaa255Mark Andrews### Rules specific to this directory:
84f95ddb2572641022619950a211aff49e331c98Mukund Sivaraman# Merge in additional sources from sun-src directory
800cfc8a5ce9ffacfc076003b34b5f787f82c701Mark Andrews# Build with gcc on x86:
32ebb157b1d9409a186c86002827f8a1f4931f5aMark AndrewsMESA_CFLAGS=$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS) -D_REENTRANT
19d80ce5844e00a021643759adcbe27c11b485a0Witold Krecicki# Build with Sun Studio cc on x86:
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews#MESA_CFLAGS=$(LIB_CFLAGS)
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews#MESA_CFG_32_i386=solaris-x86-cc-dri
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews#MESA_CFG_64_i386=solaris-x64-cc-dri
19d80ce5844e00a021643759adcbe27c11b485a0Witold KrecickiBUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_32)
19d80ce5844e00a021643759adcbe27c11b485a0Witold KrecickiBUILD_64_FLAGS=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" MESA_CFG=$(MESA_CFG_64)
19d80ce5844e00a021643759adcbe27c11b485a0Witold Krecicki# pkg-config --cflags libdrm
19d80ce5844e00a021643759adcbe27c11b485a0Witold KrecickiLIBDRM_CFLAGS = -I$(PROTODIR)$(X11_INCLUDES_DIR) -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm
8bcd80824c51c802c2927236b012cd526f569b04Mark Andrews# pkg-config --libs libdrm
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan HuntLIBDRM_LIB = -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -ldrm
67247b4a8304bac790648a351a95b8b0f4c512a6Mark AndrewsMESA_MAKEVARS= SHELL=/bin/ksh PASSED_CFLAGS="$(MESA_CFLAGS)" PASSED_INCLUDES="$(MESA_INCLUDES)" ARCH_FLAGS="" LIBDRM_CFLAGS="$(LIBDRM_CFLAGS)" LIBDRM_LIB="$(LIBDRM_LIB)"
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan HuntMESA_MAKEENV= PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig
206e697f24e47b8868bd68a5b6ef42f5f62e39d5Evan Hunt# LD_OPTIONS="$(LIB_REQUIRED_LDFLAGS)"
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt (cd $(SOURCE_DIR)/configs && rm -f current && ln -s $(MESA_CFG) current)
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt (cd $(SOURCE_DIR) && $(MESA_MAKEENV) $(GNUMAKE) $(MFLAGS) -e $(MESA_MAKEVARS) default)
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt (cd $(SOURCE_DIR) && $(GNUMAKE) $(MFLAGS) -e DESTDIR=$(PROTODIR) ARCHLIBSUBDIR=$(ARCHLIBSUBDIR) install )