Makefile revision 1370
418N/A#
418N/A# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
418N/A#
418N/A# Permission is hereby granted, free of charge, to any person obtaining a
418N/A# copy of this software and associated documentation files (the "Software"),
418N/A# to deal in the Software without restriction, including without limitation
418N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
418N/A# and/or sell copies of the Software, and to permit persons to whom the
418N/A# Software is furnished to do so, subject to the following conditions:
418N/A#
418N/A# The above copyright notice and this permission notice (including the next
418N/A# paragraph) shall be included in all copies or substantial portions of the
418N/A# Software.
418N/A#
418N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
418N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
418N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
418N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
418N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
418N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
418N/A# DEALINGS IN THE SOFTWARE.
418N/A#
418N/A#
418N/A
418N/A# Package name used in tarballs
418N/AMODULE_NAME=libdrm
418N/A
418N/A# Package metadata
418N/AUPSTREAM = Direct Rendering Infrastructure project
418N/AUPSTREAM_URL = http://dri.freedesktop.org/
418N/AUPSTREAM_SET = yes
418N/AORACLE_TPNO = 9900
418N/A
418N/A# Version number (used in path names)
418N/AMODULE_VERSION=2.4.43
493N/A
418N/A# Checksums for upstream tarball
418N/ATARBALL_MD5 = 7de4afd3756726d11f1bf75bd91ba716
553N/ATARBALL_SHA1 = 80e810e0476a0c479a84b74f22aa1bc228484ce6
418N/ATARBALL_SHA256 = 7fb8cd89df06e236a66a1a6a9f6d058271c1b1ec92631e08c66dc9e12abd4975
418N/A
553N/A# Library name (used for specfiles/mapfiles)
418N/ALIBNAME=drm
553N/A
553N/A# Download site for source
553N/ASOURCE_URL=http://dri.freedesktop.org/libdrm/$(SOURCE_TARBALL_NAME)
553N/ASOURCE_URL_SET=yes
418N/AGIT_URL=$(FDO_GIT_URL)/mesa/drm
418N/AGIT_URL_SET=yes
418N/A
418N/A# Patches to apply to source after unpacking, in order
418N/ASOURCE_PATCHES += solaris-drm-port.patch,-p1
418N/ASOURCE_PATCHES += atomic.patch
418N/ASOURCE_PATCHES += man.patch
418N/A
493N/A# Can't build tests with parfait yet, due to parfait-ld error:
493N/A# llvm-ld: error: Cannot link file '../../libkms/libkms.so.1.bc:
418N/A# Linking globals named 'drmSetServerInfo': symbol multiply defined!
418N/A$(WITH_PARFAIT) SOURCE_PATCHES += no-tests.patch,-p1
418N/A$(WITH_PARFAIT) AUTORECONF = yes
418N/A
418N/A# Need to use GNU Make to build
418N/AMODULE_MAKE=$(GNUMAKE)
418N/AMODULE_MAKE_SET=yes
418N/A
418N/A# To build with gcc, uncomment these lines and comment out the MODULE_CFLAGS
418N/AMODULE_COMPILER=gcc
493N/AMODULE_COMPILER_SET=yes
418N/A
418N/A# Tell Sun compiler to not apply optimizations that increase binary sizes
418N/A# Without this flag, Studio 12 binaries are almost 2x bigger (CR 6808868)
418N/A#MODULE_CFLAGS = -xspace
418N/A
418N/A
493N/AMODULE_BUILD_MAKEFLAGS = libkms_la_LIBADD=../libdrm.so.2
418N/A
450N/A# Command line options to GNU autoconf configure script
549N/AMODULE_CONFIG_OPTS = --enable-libkms --disable-nouveau
450N/A
450N/A# Man pages to apply Sun footer to & attributes to list
418N/A#SUNTOUCHED_MANPAGES=*.man
#MODULE_STABILITY=Volatile
#LIB_MAN_SUFFIX=3drm
# pkg-config files that need to have -R added
FIX_PC_FILES=libdrm.pc.in intel/libdrm_intel.pc.in libkms/libkms.pc.in radeon/libdrm_radeon.pc
# Where to install files
MODULE_ADD_LIB_SUBDIR = $(X11_SERVERLIBS_SUBDIR)
MODULE_PKGCONFIG_DIR = $(PKGCONFIG_DIR)
MODULE_PKGCONFIG_DIR_SET = yes
include ../Makefile.inc
install: $(PROTODIR)/usr/include/drm
$(PROTODIR)/usr/include/drm:
@rm -f $@
ln -s libdrm $@
# Upstream seems to install in $(X11_SERVERLIBS_SUBDIR)/pkgconfig no matter
# what, so just move them afterwards
PC_FILES_i386 = libdrm_intel.pc libdrm_radeon.pc
PC_FILES = libdrm.pc libkms.pc $(PC_FILES_$(MACH))
MOVED_PC_FILES = $(PC_FILES:%=$(PROTODIR)/$(PKGCONFIG_DIR)/%)
XSERVER_PC_DIR = $(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)/pkgconfig
install-gen: $(MOVED_PC_FILES)
$(PROTODIR)/$(PKGCONFIG_DIR)/%.pc: $(PROTODIR)/$(XSERVER_PC_DIR)/%.pc
-rm -f $@
mv $< $@
$(PC_FILES:%=$(PROTODIR)/$(XSERVER_PC_DIR)/%): default_install