Makefile revision 1422
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Permission is hereby granted, free of charge, to any person obtaining a
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# copy of this software and associated documentation files (the "Software"),
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# to deal in the Software without restriction, including without limitation
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# the rights to use, copy, modify, merge, publish, distribute, sublicense,
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# and/or sell copies of the Software, and to permit persons to whom the
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Software is furnished to do so, subject to the following conditions:
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# The above copyright notice and this permission notice (including the next
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# paragraph) shall be included in all copies or substantial portions of the
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Software.
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# DEALINGS IN THE SOFTWARE.
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Package name used in tarballs
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_NAME=libdrm
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Package metadata
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bUPSTREAM = Direct Rendering Infrastructure project
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bUPSTREAM_URL = http://dri.freedesktop.org/
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bUPSTREAM_SET = yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bORACLE_TPNO = 9900
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Version number (used in path names)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_VERSION=2.4.43
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Checksums for upstream tarball
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bTARBALL_MD5 = 7de4afd3756726d11f1bf75bd91ba716
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bTARBALL_SHA1 = 80e810e0476a0c479a84b74f22aa1bc228484ce6
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bTARBALL_SHA256 = 7fb8cd89df06e236a66a1a6a9f6d058271c1b1ec92631e08c66dc9e12abd4975
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Library name (used for specfiles/mapfiles)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bLIBNAME=drm
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Download site for source
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bSOURCE_URL=http://dri.freedesktop.org/libdrm/$(SOURCE_TARBALL_NAME)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bSOURCE_URL_SET=yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bGIT_URL=$(FDO_GIT_URL)/mesa/drm
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bGIT_URL_SET=yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Patches to apply to source after unpacking, in order
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bSOURCE_PATCHES += solaris-drm-port.patch,-p1
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bSOURCE_PATCHES += atomic.patch
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Can't build tests with parfait yet, due to parfait-ld error:
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# llvm-ld: error: Cannot link file '../../libkms/libkms.so.1.bc:
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Linking globals named 'drmSetServerInfo': symbol multiply defined!
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b$(WITH_PARFAIT) SOURCE_PATCHES += no-tests.patch,-p1
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b$(WITH_PARFAIT) AUTORECONF = yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Need to use GNU Make to build
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_MAKE=$(GNUMAKE)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_MAKE_SET=yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Need to build with gcc
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_COMPILER=gcc
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_COMPILER_SET=yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_BUILD_MAKEFLAGS = libkms_la_LIBADD=../libdrm.so.2
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Command line options to GNU autoconf configure script
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_CONFIG_OPTS = --enable-libkms --disable-nouveau
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Man pages to apply Sun footer to & attributes to list
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#SUNTOUCHED_MANPAGES=*.man
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#MODULE_STABILITY=Volatile
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b#LIB_MAN_SUFFIX=3drm
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# pkg-config files that need to be updated
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bFIX_PC_FILES=libdrm.pc.in intel/libdrm_intel.pc.in libkms/libkms.pc.in \
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b radeon/libdrm_radeon.pc.in
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Where to install files
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_ADD_LIB_SUBDIR = $(X11_SERVERLIBS_SUBDIR)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_PKGCONFIG_DIR = $(PKGCONFIG_DIR)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMODULE_PKGCONFIG_DIR_SET = yes
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_binclude ../Makefile.inc
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_binstall: $(PROTODIR)/usr/include/drm
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b$(PROTODIR)/usr/include/drm:
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b @rm -f $@
d19de0ff8b0793e74e98429ded50868ce7e9f75cAlex Valavanis ln -s libdrm $@
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# Upstream seems to install in $(X11_SERVERLIBS_SUBDIR)/pkgconfig no matter
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b# what, so just move them afterwards
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bPC_FILES_i386 = libdrm_intel.pc libdrm_radeon.pc
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bPC_FILES = libdrm.pc libkms.pc $(PC_FILES_$(MACH))
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bMOVED_PC_FILES = $(PC_FILES:%=$(PROTODIR)/$(PKGCONFIG_DIR)/%)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_bXSERVER_PC_DIR = $(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)/pkgconfig
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_binstall-gen: $(MOVED_PC_FILES)
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b$(PROTODIR)/$(PKGCONFIG_DIR)/%.pc: $(PROTODIR)/$(XSERVER_PC_DIR)/%.pc
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b -rm -f $@
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b mv $< $@
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b$(PC_FILES:%=$(PROTODIR)/$(XSERVER_PC_DIR)/%): default_install
a0df1b8dd5b14367c583ce2f72a2ca6bf1cde799gustav_b