Makefile revision 851
2cacab200fb387e290386593d9b2fca2e7beef33csovant###############################################################################
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# libpciaccess Makefile
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Use is subject to license terms.
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# Permission is hereby granted, free of charge, to any person obtaining a
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# copy of this software and associated documentation files (the
2cacab200fb387e290386593d9b2fca2e7beef33csovant# "Software"), to deal in the Software without restriction, including
2cacab200fb387e290386593d9b2fca2e7beef33csovant# without limitation the rights to use, copy, modify, merge, publish,
2cacab200fb387e290386593d9b2fca2e7beef33csovant# distribute, and/or sell copies of the Software, and to permit persons
2cacab200fb387e290386593d9b2fca2e7beef33csovant# to whom the Software is furnished to do so, provided that the above
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# copyright notice(s) and this permission notice appear in all copies of
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# the Software and that both the above copyright notice(s) and this
3437829f938dbb44527d91fbbc5f430a1243c5a5JnRouvignac# permission notice appear in supporting documentation.
2cacab200fb387e290386593d9b2fca2e7beef33csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2cacab200fb387e290386593d9b2fca2e7beef33csovant# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2cacab200fb387e290386593d9b2fca2e7beef33csovant# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
2cacab200fb387e290386593d9b2fca2e7beef33csovant# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2cacab200fb387e290386593d9b2fca2e7beef33csovant# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
d81f6d00c343633159fc5ea08599d145135612c0ludovicp# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
d6b1be7037488b905b5c6330ba50269a01635bf7csovant# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2cacab200fb387e290386593d9b2fca2e7beef33csovant# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2cacab200fb387e290386593d9b2fca2e7beef33csovant# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant#
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Except as contained in this notice, the name of a copyright holder
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# shall not be used in advertising or otherwise to promote the sale, use
2cacab200fb387e290386593d9b2fca2e7beef33csovant# or other dealings in this Software without prior written authorization
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# of the copyright holder.
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant#
2cacab200fb387e290386593d9b2fca2e7beef33csovant
2cacab200fb387e290386593d9b2fca2e7beef33csovant# Package name used in tarballs
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_NAME=libpciaccess
28eeffb99d4c7f8ff501c22d1d21501cbfe3ad32csovant
6314b432b7c0331b09def3ea582fe3ce692b708acsovant# Version number (used in path names)
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_VERSION=0.10.9
b86619aed31fdffdfb5b22e8d34f2aa0a9735fdacsovant
6314b432b7c0331b09def3ea582fe3ce692b708acsovant# Patches to apply to source after unpacking, in order
f9fdabbe3ac731fa9c04b95ec6864f6b0e2c34a2csovantSOURCE_PATCHES = \
9a4b47e50eaed3431847d0e05a80db3c6931acacgary.williams pciaccess_private.h.patch \
f9fdabbe3ac731fa9c04b95ec6864f6b0e2c34a2csovant scanpci.man.patch \
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiot solx_devfs.c.patch
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiot
f9fdabbe3ac731fa9c04b95ec6864f6b0e2c34a2csovant# Library name
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiotLIBNAME=libpciaccess
eda829585653ed50fc05afe1c87ae2803f6862a6csovant
30bc8f42b7a3f724edb7cbc8e4e22e84e86c34cemadiot# Where to install libpciaccess files
2cacab200fb387e290386593d9b2fca2e7beef33csovantMODULE_PREFIX=/usr
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_PREFIX_SET=yes
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Man pages to apply Sun footer to & attributes to list
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant#SUNTOUCHED_MANPAGES=man/*.man
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantSUN_PACKAGE=SUNWpciaccess
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_STABILITY=Volatile
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantLIB_MAN_SUFFIX=3pciaccess
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift# pkg-config files that need to have -R added
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swiftFIX_PC_FILES=pciaccess.pc.in
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift# Activate additional debugging code in debug builds
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swiftMODULE_DEBUG_FLAGS=-DDEBUG
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant# Additional targets for scanpci
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_ADD_SOURCE_TARGETS = source_scanpci_man
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantMODULE_ADD_INSTALL_TARGETS = install_scanpci
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
f5aaa49dba43db0e99f06476534a8749820515dbcsovantinclude ../Makefile.inc
f5aaa49dba43db0e99f06476534a8749820515dbcsovant
f5aaa49dba43db0e99f06476534a8749820515dbcsovant# Update scanpci.man with program man page flags instead of library ones
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantsource_scanpci_man:: default_source
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant (cd $(SOURCE_DIR) && \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
62ecec3a82a8b838ee76c1f6610902d8fd7015cbmatthew_swift -a '{Availability, $(SUN_PACKAGE)}' \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant -a '{Interface Stability, $(MODULE_STABILITY)}' \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant -p $(MODULE_PREFIX)/bin/ \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant src/scanpci.man && \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant sed -e 's/__xorgversion__/"$(MODULE_NAME) $(MODULE_VERSION)"/' \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant src/scanpci.man > src/scanpci.1 )
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant
4307522debc92aa718245251f11a2ecff81c0e75csovant# We want to install scanpci, even though the upstream Makefile doesn't
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovantinstall_scanpci:: default_install
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant mkdir -p $(PROTODIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR) \
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant $(PROTODIR)$(MODULE_PREFIX)/share/man/man1
23f633e1b8cc53fdac740eca4ab7e0341890bba2csovant $(INSTALL_SCRIPT) -m 755 $(SOURCE_DIR)/src/scanpci \
471bdba2108ce1967325d949b1bf2b6944ac3b68ludo $(PROTODIR)$(MODULE_PREFIX)/bin$(ARCHLIBSUBDIR)/scanpci
471bdba2108ce1967325d949b1bf2b6944ac3b68ludo $(INSTALL_SCRIPT) -m 444 $(SOURCE_DIR)/src/scanpci.1 \
471bdba2108ce1967325d949b1bf2b6944ac3b68ludo $(PROTODIR)$(MODULE_PREFIX)/share/man/man1/scanpci.1
2cacab200fb387e290386593d9b2fca2e7beef33csovant
f5aaa49dba43db0e99f06476534a8749820515dbcsovant