Makefile revision 1446
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Permission is hereby granted, free of charge, to any person obtaining a
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# copy of this software and associated documentation files (the "Software"),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# to deal in the Software without restriction, including without limitation
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# the rights to use, copy, modify, merge, publish, distribute, sublicense,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and/or sell copies of the Software, and to permit persons to whom the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Software is furnished to do so, subject to the following conditions:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The above copyright notice and this permission notice (including the next
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# paragraph) shall be included in all copies or substantial portions of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Software.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# DEALINGS IN THE SOFTWARE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Package name used in tarballs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_NAME=libdrm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Package metadata
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUPSTREAM = Direct Rendering Infrastructure project
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUPSTREAM_URL = http://dri.freedesktop.org/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUPSTREAM_SET = yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteORACLE_TPNO = 9900
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Version number (used in path names)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_VERSION=2.4.43
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Checksums for upstream tarball
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTARBALL_MD5 = 7de4afd3756726d11f1bf75bd91ba716
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTARBALL_SHA1 = 80e810e0476a0c479a84b74f22aa1bc228484ce6
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTARBALL_SHA256 = 7fb8cd89df06e236a66a1a6a9f6d058271c1b1ec92631e08c66dc9e12abd4975
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Library name (used for specfiles/mapfiles)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLIBNAME=drm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Download site for source
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSOURCE_URL=http://dri.freedesktop.org/libdrm/$(SOURCE_TARBALL_NAME)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSOURCE_URL_SET=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGIT_URL=$(FDO_GIT_URL)/mesa/drm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteGIT_URL_SET=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Patches to apply to source after unpacking, in order
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSOURCE_PATCHES += solaris-drm-port.patch,-p1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSOURCE_PATCHES += atomic.patch
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSOURCE_PATCHES += man.patch
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Can't build tests with parfait yet, due to parfait-ld error:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# llvm-ld: error: Cannot link file '../../libkms/libkms.so.1.bc:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Linking globals named 'drmSetServerInfo': symbol multiply defined!
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(WITH_PARFAIT) SOURCE_PATCHES += no-tests.patch,-p1
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(WITH_PARFAIT) AUTORECONF = yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Need to use GNU Make to build
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_MAKE=$(GNUMAKE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_MAKE_SET=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_COMPILER=gcc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_COMPILER_SET=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Tell Sun compiler to not apply optimizations that increase binary sizes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#MODULE_CFLAGS = -xspace
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_BUILD_MAKEFLAGS = libkms_la_LIBADD=../libdrm.so.2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Command line options to GNU autoconf configure script
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_CONFIG_OPTS = --enable-libkms --disable-nouveau
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Man pages to apply Sun footer to & attributes to list
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#SUNTOUCHED_MANPAGES=*.man
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_STABILITY = Volatile
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLIB_MAN_SUFFIX = 3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_MTLEVEL=Unknown
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_MTLEVEL_SET=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_PKGCONFIG_MAN=libdrm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_PKGCONFIG_MAN_SET=yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# pkg-config files that need to be updated
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteFIX_PC_FILES=libdrm.pc.in intel/libdrm_intel.pc.in libkms/libkms.pc.in \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte radeon/libdrm_radeon.pc.in
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Where to install files
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_ADD_LIB_SUBDIR = $(X11_SERVERLIBS_SUBDIR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_PKGCONFIG_DIR = $(PKGCONFIG_DIR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE_PKGCONFIG_DIR_SET = yes
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude ../Makefile.inc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinstall: $(PROTODIR)/usr/include/drm
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(PROTODIR)/usr/include/drm:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte @rm -f $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ln -s libdrm $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Upstream seems to install in $(X11_SERVERLIBS_SUBDIR)/pkgconfig no matter
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# what, so just move them afterwards
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePC_FILES_i386 = libdrm_intel.pc libdrm_radeon.pc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn FortePC_FILES = libdrm.pc libkms.pc $(PC_FILES_$(MACH))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMOVED_PC_FILES = $(PC_FILES:%=$(PROTODIR)/$(PKGCONFIG_DIR)/%)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteXSERVER_PC_DIR = $(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)/pkgconfig
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinstall-gen: $(MOVED_PC_FILES) install_fixed_manpages
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(PROTODIR)/$(PKGCONFIG_DIR)/%.pc: $(PROTODIR)/$(XSERVER_PC_DIR)/%.pc
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -rm -f $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte mv $< $@
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte$(PC_FILES:%=$(PROTODIR)/$(XSERVER_PC_DIR)/%): default_install
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Need to apply suntouch changes to man pages generated during build
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMANDIR = $(PROTODIR)$(X11_MAN_DIR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinstall_fixed_manpages: default_install
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(PERL) $(TOP)/open-src/common/suntouch-manpages.pl \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(SUNTOUCH_MAN_FLAGS) $(BUILD_DIR)/man/*.{3,7}
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ginstall -m 0444 $(BUILD_DIR)/man/*.3 $(MANDIR)/man3
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ginstall -m 0444 $(BUILD_DIR)/man/*.7 $(MANDIR)/man7
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte