Makefile revision 1068
2cacab200fb387e290386593d9b2fca2e7beef33csovant###############################################################################
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# libpciaccess Makefile
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Permission is hereby granted, free of charge, to any person obtaining a
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# copy of this software and associated documentation files (the "Software"),
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# to deal in the Software without restriction, including without limitation
2cacab200fb387e290386593d9b2fca2e7beef33csovant# the rights to use, copy, modify, merge, publish, distribute, sublicense,
2cacab200fb387e290386593d9b2fca2e7beef33csovant# and/or sell copies of the Software, and to permit persons to whom the
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Software is furnished to do so, subject to the following conditions:
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# The above copyright notice and this permission notice (including the next
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# paragraph) shall be included in all copies or substantial portions of the
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# Software.
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2cacab200fb387e290386593d9b2fca2e7beef33csovant# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2cacab200fb387e290386593d9b2fca2e7beef33csovant# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
2cacab200fb387e290386593d9b2fca2e7beef33csovant# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2cacab200fb387e290386593d9b2fca2e7beef33csovant# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
d81f6d00c343633159fc5ea08599d145135612c0ludovicp# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
d6b1be7037488b905b5c6330ba50269a01635bf7csovant# DEALINGS IN THE SOFTWARE.
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Package name used in tarballs
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_NAME=libpciaccess
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Version number (used in path names)
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_VERSION=0.10.9
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Checksums for upstream tarball
2cacab200fb387e290386593d9b2fca2e7beef33csovantTARBALL_MD5 = 685cb20e7a6165bc010972f1183addbd
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantTARBALL_SHA1 = 491e137f34a22f7208a6b0f68cbe51d929923591
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant
6314b432b7c0331b09def3ea582fe3ce692b708acsovant# Patches to apply to source after unpacking, in order
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantSOURCE_PATCHES = \
b86619aed31fdffdfb5b22e8d34f2aa0a9735fdacsovant pciaccess_private.h.patch \
6314b432b7c0331b09def3ea582fe3ce692b708acsovant scanpci.man.patch \
f9fdabbe3ac731fa9c04b95ec6864f6b0e2c34a2csovant solx_devfs.c.patch
9a4b47e50eaed3431847d0e05a80db3c6931acacgary.williams
f9fdabbe3ac731fa9c04b95ec6864f6b0e2c34a2csovant# Library name
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiotLIBNAME=libpciaccess
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiot
f9fdabbe3ac731fa9c04b95ec6864f6b0e2c34a2csovant# Where to install libpciaccess files
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiotMODULE_PREFIX=/usr
eda829585653ed50fc05afe1c87ae2803f6862a6csovantMODULE_PREFIX_SET=yes
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiot
2cacab200fb387e290386593d9b2fca2e7beef33csovant# pkg(5) name we deliver the files in (override default)
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_PKGNAME=diagnostic/scanpci
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_PKGNAME_SET=yes
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Package classification (override default)
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_PKGCLASS=System/Hardware
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_PKGCLASS_SET=yes
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift# ARC cases that covered this module
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift# PSARC/2008/638 libpciaccess & scanpci
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swiftMODULE_ARC_CASES = PSARC/2008/638
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift# Man pages to apply Sun footer to & attributes to list
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift#SUNTOUCHED_MANPAGES=man/*.man
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_STABILITY=Volatile
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantLIB_MAN_SUFFIX=3pciaccess
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# pkg-config files that need to have -R added
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantFIX_PC_FILES=pciaccess.pc.in
f5aaa49dba43db0e99f06476534a8749820515dbcsovant
f5aaa49dba43db0e99f06476534a8749820515dbcsovant# Activate additional debugging code in debug builds
f5aaa49dba43db0e99f06476534a8749820515dbcsovantMODULE_DEBUG_FLAGS=-DDEBUG
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Additional targets for scanpci
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_ADD_SOURCE_TARGETS = source_scanpci_man
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swiftMODULE_ADD_INSTALL_TARGETS_32 = install_scanpci
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_ADD_INSTALL_TARGETS = $(MODULE_ADD_INSTALL_TARGETS_$(BUILD_TYPE))
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Compatibility links from /usr/X11/bin to /usr/bin
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_X11_BINCOMPAT_LINKS = scanpci
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantinclude ../Makefile.inc
4307522debc92aa718245251f11a2ecff81c0e75csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Update scanpci.man with program man page flags instead of library ones
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantSCANPCI_MAN_SRC = $(SOURCE_DIR)/src/scanpci.man
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantSCANPCI_MAN_OUT = $(SOURCE_DIR)/src/scanpci.1
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
471bdba2108ce1967325d949b1bf2b6944ac3b68ludosource_scanpci_man: $(SCANPCI_MAN_OUT)
471bdba2108ce1967325d949b1bf2b6944ac3b68ludo
471bdba2108ce1967325d949b1bf2b6944ac3b68ludo$(SCANPCI_MAN_SRC): $(UNPACK_TARGET)
2cacab200fb387e290386593d9b2fca2e7beef33csovant
f5aaa49dba43db0e99f06476534a8749820515dbcsovant$(SCANPCI_MAN_OUT): $(SCANPCI_MAN_SRC)
f5aaa49dba43db0e99f06476534a8749820515dbcsovant (cd $(SOURCE_DIR) && \
f5aaa49dba43db0e99f06476534a8749820515dbcsovant $(PERL) $(TOP)/open-src/common/suntouch-manpages.pl \
f5aaa49dba43db0e99f06476534a8749820515dbcsovant $(COMMON_SUNTOUCH_MAN_FLAGS) \
2cacab200fb387e290386593d9b2fca2e7beef33csovant -p $(MODULE_PREFIX)/bin/ \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant -r '{__distroname__, $(DISTRO_NAME)}' \
d81f6d00c343633159fc5ea08599d145135612c0ludovicp -r '{__xorgversion__, "$(MODULE_NAME) $(MODULE_VERSION)"}' \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant src/scanpci.man && \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant cp src/scanpci.man src/scanpci.1 )
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# We want to install scanpci, even though the upstream Makefile doesn't
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantinstall_scanpci: default_install $(SCANPCI_MAN_OUT)
d81f6d00c343633159fc5ea08599d145135612c0ludovicp mkdir -p $(PROTODIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR) \
d81f6d00c343633159fc5ea08599d145135612c0ludovicp $(PROTODIR)/etc/security/exec_attr.d/ \
2cacab200fb387e290386593d9b2fca2e7beef33csovant $(PROTODIR)$(MODULE_PREFIX)/share/man/man1
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant $(INSTALL_SCRIPT) -m 755 $(SOURCE_DIR)/src/scanpci \
2cacab200fb387e290386593d9b2fca2e7beef33csovant $(PROTODIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)/scanpci
2cacab200fb387e290386593d9b2fca2e7beef33csovant $(INSTALL_SCRIPT) -m 444 $(SOURCE_DIR)/src/scanpci.1 \
2cacab200fb387e290386593d9b2fca2e7beef33csovant $(PROTODIR)$(MODULE_PREFIX)/share/man/man1/scanpci.1
b73400027a532e959a9d7bd2de7c11fd31abc2ebmadiot $(INSTALL_SCRIPT) -m 444 exec_attr \
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift $(PROTODIR)/etc/security/exec_attr.d/scanpci
952ad8196de7c88ec554d81ad11679a81070d245csovant