Makefile revision 1447
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington###############################################################################
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
a02a0a8a7eb461619931f4a0e896afa247b52c54Mark Andrews# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews#
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# copy of this software and associated documentation files (the "Software"),
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# to deal in the Software without restriction, including without limitation
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# the rights to use, copy, modify, merge, publish, distribute, sublicense,
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and/or sell copies of the Software, and to permit persons to whom the
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Software is furnished to do so, subject to the following conditions:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# The above copyright notice and this permission notice (including the next
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# paragraph) shall be included in all copies or substantial portions of the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# Software.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
f8f37672a57524560fbdde52484e6ae3de1c3354Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# DEALINGS IN THE SOFTWARE.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Package name used in tarballs
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsMODULE_NAME=mesa-demos
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Package metadata
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonUPSTREAM = The Mesa 3-D Graphics Library
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsUPSTREAM_URL = http://mesa3d.org/
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsUPSTREAM_SET = yes
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark AndrewsMODULE_DESC = the Mesa 3-D Graphics demo applications
068a66979695c77359e7a9181bb3f831c965b21cMark AndrewsORACLE_TPNO = 9926
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark Andrews# pkg(5) name we deliver the files in (override default)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMODULE_PKGNAME=x11/demo/mesa-demos
4038ab55037184d76153afd3c469aa8c85adf85dMark AndrewsMODULE_PKGNAME_SET=yes
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Version number (used in path names)
bac2ed6ec3fbb5420e6ce69dd1218745d4e02b1eMark AndrewsMODULE_VERSION=8.1.0
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# Checksums for upstream tarball
a0624cf8d5711cca4e3907859fbc8062a7e460faMark AndrewsTARBALL_MD5 = 9df33ba69a26bbfbc7c8148602e59542
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsTARBALL_SHA1 = c970ebd5aaae561b5fb499985bef004e11b72501
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Download site for source
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/demos/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsSOURCE_URL_SET=yes
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Binaries built in tree
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsDEMOS_DIR=$(BUILD_DIR)/src/xdemos
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonGLXGEARS_BIN=$(DEMOS_DIR)/glxgears
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark AndrewsGLXINFO_BIN=$(DEMOS_DIR)/glxinfo
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
75216e007570b8ea36b3ac9cca096bf70c0ca6f6Mark Andrews# Override some configure checks for libraries we don't need in the subset
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# we build & ship - have to set them to be non-empty strings though or
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# configure will fail.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMODULE_CONFIG_ENV = \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews GLEW_CFLAGS="-I-have-no-GLEW-" GLEW_LIBS="-I-have-no-GLEW-"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# What to build
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsBUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN) $(MODTYPE_ADD_BUILD_TARGETS)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsBUILD_TARGETS_SET=yes
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsBUILD_TYPES_SET=yes
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark AndrewsBUILD_TYPES=32 64
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# What to install
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsINSTALL_TARGETS= install_demos install_man
eaccf5e805405de257b5a4840256c580fefe00e3Mark AndrewsINSTALL_TARGETS_SET=yes
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Compatibility links from /usr/X11/bin to /usr/bin
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark AndrewsMODULE_X11_BINCOMPAT_LINKS = glxinfo
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson### Include common rulesets
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ../Makefile.inc
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson### Rules specific to this directory:
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Only care about building X demos
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonDEMO_LDFLAGS = $(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonMODULE_LD_OPTIONS = $(ZDISCARD_UNUSED_DEP)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# Flags passed on make command line when building
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonDEMO_BUILD_COMMAND = $(DEFAULT_BUILD_COMMAND:@DIR@=$(DEMOS_DIR))
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
c25080dc50542213058c240226c9f342186e6285Mark Andrews# Build Mesa demos
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews $(DEMO_BUILD_COMMAND) glxgears
0756445a735e2df39bf798d8de42ae5dd030aa3bMark Andrews
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
c25080dc50542213058c240226c9f342186e6285Mark Andrews $(DEMO_BUILD_COMMAND) glxinfo
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrews# For testing - we don't ship the rest of these
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
c25080dc50542213058c240226c9f342186e6285Mark Andrews $(DEMO_BUILD_COMMAND)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
413988c8166976498250c0ebb2e3a645d0366bd3Mark Andrewsall-xdemos:
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews $(MAKE) $(MAKEFLAGS) $(BUILD_64_FLAGS) all-xdemos_gen
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark AndrewsDESTDIR=$(PROTODIR)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinstall_demos: $(INSTALL_DEPS)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews cp -pf $(GLXGEARS_BIN) $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrewsinstall_man:
642e0716c8b4ab82ebc8e60f94c9e897ee89f19aMark Andrews mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews