Makefile revision 1265
126N/A###############################################################################
126N/A#
126N/A# libpciaccess Makefile
126N/A#
1072N/A# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
126N/A#
126N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
126N/A#
126N/A
126N/A# Package name used in tarballs
126N/AMODULE_NAME=libpciaccess
493N/A
126N/A# Version number (used in path names)
126N/AMODULE_VERSION=0.13
1072N/A
126N/A# Checksums for upstream tarball
911N/ATARBALL_MD5 = 2604307ba43c76ee8aec11ea137ae1e8
1072N/ATARBALL_SHA1 = 7ddd8e1de27326f6f4a3ac6b4d2241fe77ef5353
1072N/ATARBALL_SHA256= 24368520b0947487ec73729e3c97c95f3d9bf83704a910bb0abe1d5a63df32fd
911N/A
126N/A# Patches to apply to source after unpacking, in order
126N/ASOURCE_PATCHES = \
126N/A scanpci.man.patch \
126N/A primary-vga.patch,-p1 \
126N/A scanpci_64bit.patch,-p1
126N/A
126N/A# Library name
126N/ALIBNAME=libpciaccess
493N/A
969N/A# Where to install libpciaccess files
126N/AMODULE_PREFIX=/usr
970N/AMODULE_PREFIX_SET=yes
970N/A
970N/A# pkg(5) name we deliver the files in (override default)
126N/AMODULE_PKGNAME=diagnostic/scanpci
126N/AMODULE_PKGNAME_SET=yes
493N/A# Package classification (override default)
126N/AMODULE_PKGCLASS=System/Hardware
126N/AMODULE_PKGCLASS_SET=yes
493N/A
126N/A# ARC cases that covered this module
126N/A# PSARC/2008/638 libpciaccess & scanpci
126N/AMODULE_ARC_CASES = PSARC/2008/638
126N/A
970N/A# Man pages to apply Sun footer to & attributes to list
970N/ASUNTOUCHED_MANPAGES=man/scanpci.man
970N/AMODULE_STABILITY=Volatile
126N/ALIB_MAN_SUFFIX=3pciaccess
# Update scanpci.man with program man page flags instead of library ones
SUNTOUCH_MAN_FLAGS = $(COMMON_SUNTOUCH_MAN_FLAGS)
SUNTOUCH_MAN_FLAGS +=-p $(MODULE_PREFIX)/bin/
SUNTOUCH_MAN_FLAGS_SET=yes
# pkg-config files that need to have -R added
FIX_PC_FILES=pciaccess.pc.in
# Activate additional debugging code in debug builds
MODULE_DEBUG_FLAGS=-DDEBUG
# Override linker flags for scanpci program
PCIACCESS_PROG_LDFLAGS = $(MAPFILES_FOR_PROGS) ../src/libpciaccess.so.0
PROGRAM_VARS = scanpci
PROGRAM_MAKEFLAGS = $(PROGRAM_VARS:%=%_LDADD="$(PCIACCESS_PROG_LDFLAGS)")
MODULE_BUILD_MAKEFLAGS = AM_MAKEFLAGS='$(PROGRAM_MAKEFLAGS)'
# Additional targets for scanpci
MODULE_ADD_INSTALL_TARGETS_64 = install_scanpci
MODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
# Compatibility links from /usr/X11/bin to /usr/bin
MODULE_X11_BINCOMPAT_LINKS = scanpci
include ../Makefile.inc
# We want to install scanpci, even though the upstream Makefile doesn't
install_scanpci: default_install
mkdir -p $(PROTODIR)$(MODULE_PREFIX)/bin \
$(PROTODIR)/etc/security/exec_attr.d/ \
$(PROTODIR)$(MODULE_PREFIX)/share/man/man1
$(INSTALL_SCRIPT) -m 755 $(SOURCE_DIR)/scanpci/scanpci \
$(PROTODIR)$(MODULE_PREFIX)/bin/scanpci
$(INSTALL_SCRIPT) -m 444 $(SOURCE_DIR)/man/scanpci.1 \
$(PROTODIR)$(MODULE_PREFIX)/share/man/man1/scanpci.1
$(INSTALL_SCRIPT) -m 444 exec_attr \
$(PROTODIR)/etc/security/exec_attr.d/scanpci