Makefile revision 1422
2ronwalf###############################################################################
2ronwalf#
2ronwalf# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
2ronwalf#
2ronwalf# Permission is hereby granted, free of charge, to any person obtaining a
2ronwalf# copy of this software and associated documentation files (the "Software"),
2ronwalf# to deal in the Software without restriction, including without limitation
2ronwalf# the rights to use, copy, modify, merge, publish, distribute, sublicense,
2ronwalf# and/or sell copies of the Software, and to permit persons to whom the
2ronwalf# Software is furnished to do so, subject to the following conditions:
2ronwalf#
2ronwalf# The above copyright notice and this permission notice (including the next
2ronwalf# paragraph) shall be included in all copies or substantial portions of the
2ronwalf# Software.
2ronwalf#
2ronwalf# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2ronwalf# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2ronwalf# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
2ronwalf# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2ronwalf# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2ronwalf# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2ronwalf# DEALINGS IN THE SOFTWARE.
2ronwalf#
2ronwalf
2ronwalf# Package name used in tarballs
2ronwalfMODULE_NAME=mesa-demos
2ronwalf
2ronwalf# Package metadata
2ronwalfUPSTREAM = The Mesa 3-D Graphics Library
2ronwalfUPSTREAM_URL = http://mesa3d.org/
2ronwalfUPSTREAM_SET = yes
2ronwalfMODULE_DESC = the Mesa 3-D Graphics demo applications
2ronwalfORACLE_TPNO = 9926
2ronwalf
2ronwalf# pkg(5) name we deliver the files in (override default)
2ronwalfMODULE_PKGNAME=x11/demo/mesa-demos
2ronwalfMODULE_PKGNAME_SET=yes
2ronwalf
2ronwalf# Version number (used in path names)
2ronwalfMODULE_VERSION=8.1.0
2ronwalf
2ronwalf# Checksums for upstream tarball
2ronwalfTARBALL_MD5 = 9df33ba69a26bbfbc7c8148602e59542
2ronwalfTARBALL_SHA1 = c970ebd5aaae561b5fb499985bef004e11b72501
2ronwalf
2ronwalf# Download site for source
2ronwalfSOURCE_URL=ftp://ftp.freedesktop.org/pub/mesa/demos/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
2ronwalfSOURCE_URL_SET=yes
2ronwalf
2ronwalf# Binaries built in tree
2ronwalfDEMOS_DIR=$(BUILD_DIR)/src/xdemos
2ronwalfGLXGEARS_BIN=$(DEMOS_DIR)/glxgears
2ronwalfGLXINFO_BIN=$(DEMOS_DIR)/glxinfo
2ronwalf
2ronwalf# Override some configure checks for libraries we don't need in the subset
2ronwalf# we build & ship - have to set them to be non-empty strings though or
2ronwalf# configure will fail.
2ronwalfMODULE_CONFIG_ENV = \
2ronwalf GLEW_CFLAGS="-I-have-no-GLEW-" GLEW_LIBS="-I-have-no-GLEW-"
2ronwalf
2ronwalf# What to build
2ronwalfBUILD_TARGETS= $(GLXGEARS_BIN) $(GLXINFO_BIN) $(MODTYPE_ADD_BUILD_TARGETS)
2ronwalfBUILD_TARGETS_SET=yes
2ronwalfBUILD_TYPES_SET=yes
2ronwalfBUILD_TYPES=32 64
2ronwalf
2ronwalf# What to install
2ronwalfINSTALL_TARGETS= install_demos install_man
2ronwalfINSTALL_TARGETS_SET=yes
2ronwalf
2ronwalf# Compatibility links from /usr/X11/bin to /usr/bin
2ronwalfMODULE_X11_BINCOMPAT_LINKS = glxinfo
2ronwalf
2ronwalf### Include common rulesets
2ronwalfinclude ../Makefile.inc
2ronwalf
2ronwalf### Rules specific to this directory:
2ronwalf
2ronwalf# Only care about building X demos
2ronwalfDEMO_LDFLAGS=$(PROG_LDFLAGS) -L$(PROTODIR)$(X11_LIB_DIR)$(ARCHLIBSUBDIR) \
2ronwalf -L$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) -z ignore
2ronwalf
2ronwalf# Flags passed on make command line when building
2ronwalfMODULE_BUILD_MAKEFLAGS = LDFLAGS="$(DEMO_LDFLAGS)"
2ronwalf
2ronwalf# Build Mesa demos
2ronwalf$(GLXGEARS_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
2ronwalf (cd $(DEMOS_DIR) && \
2ronwalf $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxgears )
2ronwalf
2ronwalf$(GLXINFO_BIN): $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
2ronwalf (cd $(DEMOS_DIR) && \
2ronwalf $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) glxinfo )
2ronwalf
2ronwalf# For testing - we don't ship the rest of these
2ronwalfall-xdemos_gen: $(UNPACK_TARGET) $(CONFIGURE_TARGETS)
2ronwalf (cd $(DEMOS_DIR) && \
2ronwalf $(MODULE_MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
2ronwalf
2ronwalfall-xdemos:
2ronwalf $(MAKE) $(MAKEFLAGS) $(BUILD_64_FLAGS) all-xdemos_gen
2ronwalf
2ronwalfDESTDIR=$(PROTODIR)
2ronwalf
2ronwalfinstall_demos: $(INSTALL_DEPS)
2ronwalf mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
2ronwalf cp -pf $(GLXGEARS_BIN) $(GLXINFO_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)
2ronwalf
2ronwalfinstall_man:
2ronwalf mkdir -p $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
2ronwalf cp -pf glxgears.1 glxinfo.1 $(DESTDIR)$(MODULE_PREFIX)/share/man/man1
2ronwalf
2ronwalf
2ronwalf