Makefile revision 1360
9c4e79e1c3fce91054fd3d00750a48f79d123341niq###############################################################################
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Xorg server Makefile
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Permission is hereby granted, free of charge, to any person obtaining a
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# copy of this software and associated documentation files (the "Software"),
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# to deal in the Software without restriction, including without limitation
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# the rights to use, copy, modify, merge, publish, distribute, sublicense,
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# and/or sell copies of the Software, and to permit persons to whom the
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Software is furnished to do so, subject to the following conditions:
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# The above copyright notice and this permission notice (including the next
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# paragraph) shall be included in all copies or substantial portions of the
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Software.
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
74a027db9e9476e96b37e22c0b06407e23335e3csf# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# DEALINGS IN THE SOFTWARE.
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq#
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Package name used in tarballs
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_NAME=xorg-server
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Package metadata
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_DESC = portions of the X.Org X server software
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Version number (used in path names) - set in open-src/common/Makefile.init
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_VERSION=$(XORGSERVER_VERS)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Checksums for upstream tarball
9c4e79e1c3fce91054fd3d00750a48f79d123341niqTARBALL_MD5 = 6a0f1a1639ada4b9da7e9582bc79252a
9c4e79e1c3fce91054fd3d00750a48f79d123341niqTARBALL_SHA1 = f67a3a250216ab40f0e31648151ee1a457b70a3a
9c4e79e1c3fce91054fd3d00750a48f79d123341niqTARBALL_SHA256= a5adb02571efb7d7459dde83286a3adb77dfd1a52a7348e75d2dc72d6f8d28aa
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Patches to apply to source after unpacking, in order
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
9c4e79e1c3fce91054fd3d00750a48f79d123341niqSOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
1861c6caddf9043aff6d7b1a9e2ffb515be652ffniq# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# to allow for different source layouts
9c4e79e1c3fce91054fd3d00750a48f79d123341niqXORG_BUILD_DIR=$(SOURCE_DIR)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# ARC cases that covered this module
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2004/187 Xorg Server for Solaris
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES = PSARC/2004/187
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2004/685 Xorg server upgrade to X11R6.8 release
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2004/685
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2004/829 Xorg 6.8.2 server upgrade for Solaris
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2004/829
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2005/450 Xorg 6.9 for Solaris
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2005/450
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2006/609 Xserver provider for DTrace
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2006/609
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2007/051 Xorg server upgrade to 7.2
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2007/051
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2007/434 Xorg server 1.3
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2007/434
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2007/500 X11 MIT-SHM Extension across zones
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2007/500
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2008/294 Xorg driver selection based on VIS_GETIDENTIFIER
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2008/294
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# PSARC/2009/021 Xorg server 1.5
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2009/021
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2009/292 Xorg server 1.6
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2009/292
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2009/679 Xorg server 1.7
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2009/679
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2010/109 Introduce libXcb in Solaris
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonMODULE_ARC_CASES += PSARC/2010/109
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2011/008 Xorg server 1.9
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2011/008
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2010/382 Removal of 32-bit X servers
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonMODULE_ARC_CASES += PSARC/2010/382
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# PSARC/2011/214 Xorg server 1.10
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2011/214
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# PSARC/2012/144 Xorg server 1.12
1861c6caddf9043aff6d7b1a9e2ffb515be652ffniqMODULE_ARC_CASES += PSARC/2012/144
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# PSARC/2012/320 Xorg server 1.13
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ARC_CASES += PSARC/2012/320
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# PSARC/2013/091 Xorg server 1.14
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonMODULE_ARC_CASES += PSARC/2013/091
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Man pages to apply Sun footer to & attributes to list
9c4e79e1c3fce91054fd3d00750a48f79d123341niqSUNTOUCHED_MANPAGES= \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton man/Xserver.man \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton hw/kdrive/ephyr/man/Xephyr.man \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton hw/xfree86/utils/man/cvt.man \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq hw/xfree86/utils/man/gtf.man \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq hw/xfree86/man/Xorg.man \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq hw/xfree86/man/xorg.conf.man \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq hw/xfree86/man/xorg.conf.d.man \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq hw/vfb/man/Xvfb.man
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_STABILITY=Volatile
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Override specific attributes for specific man pages
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_SUNTOUCH_MAN_FLAGS= \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Xephyr, Xvfb, and Xdmx are split out into their own packages
9c4e79e1c3fce91054fd3d00750a48f79d123341niqSUNTOUCH_MAN_FLAGS_Xephyr = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xephyr)}'
9c4e79e1c3fce91054fd3d00750a48f79d123341niqSUNTOUCH_MAN_FLAGS_Xvfb = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xvfb)}'
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonSUNTOUCH_MAN_FLAGS_Xdmx = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xdmx)}'
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonSUNTOUCH_MAN_FLAGS_Xserver = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xserver-common)}'
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Binary built in tree
9c4e79e1c3fce91054fd3d00750a48f79d123341niqXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqBUILD_TARGETS=$(XORGSERVER_BIN) build_mdb set-elf-comments \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(BUILD_DIR)/mapfile-Xorg-externs
9c4e79e1c3fce91054fd3d00750a48f79d123341niqBUILD_TARGETS_SET=yes
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Need to convert dtrace docs from xml to text/html ourselves, since
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Solaris doesn't bundle the xmlto tool used upstream
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_DOC_DIR = $(MODULE_PREFIX)/share/doc/Xserver
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonMODULE_DOC_DIR_SET=yes
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_XML_PATH = $(SOURCE_DIR)/doc
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonDTRACE_DOC_DIR = $(MODULE_XML_PATH)/dtrace
9c4e79e1c3fce91054fd3d00750a48f79d123341niqDTRACE_DOCS = $(DTRACE_DOC_DIR)/Xserver-DTrace.html
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonDTRACE_DOCS += $(DTRACE_DOC_DIR)/Xserver-DTrace.txt
9c4e79e1c3fce91054fd3d00750a48f79d123341niqBUILD_TARGETS += $(DTRACE_DOCS)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Need to regenerate autoconf/automake files after patching
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niqAUTORECONF=yes
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Command line options to GNU autoconf configure script
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# XXX: --disable-dga
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq --enable-dmx \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq --enable-builddocs \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton --enable-kdrive --enable-xephyr --disable-xsdl \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq MKFONTDIR="$(MKFONTDIR)" \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton MKFONTSCALE="$(MKFONTSCALE)"
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_LDFLAGS = $(XSERVER_LDFLAGS)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_LD_OPTIONS = $(MAPFILES_FOR_ALL)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Pass linker mapfile listing symbols that modules can count on resolving
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# from the Xorg binary itself
9c4e79e1c3fce91054fd3d00750a48f79d123341niqXORG_EXTERNS_FLAG = -Wl,-M,$(PWD)/$(XORG_EXTERNS_FILE)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_BUILD_ENV = XORG_EXTERNS_FLAG='$(XORG_EXTERNS_FLAG)'
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_LDFLAGS += $(XORG_EXTERNS_FLAG)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Optimization doesn't always remove unused inline functions, leaving many
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# binaries referencing pixman symbols that normally don't need them. Using
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# -z ignore should ensure that it's not added when not really needed.
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Adding -z muldefs for 16418361 - which should be removed once we fix that
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_CONFIG_OPTS += LIBS="-z ignore -lpixman-1 -z muldefs"
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# pkg-config files that need to have -R added
9c4e79e1c3fce91054fd3d00750a48f79d123341niqFIX_PC_FILES=xorg-server.pc.in
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Remove compiler specific visibility flag that breaks builds of drivers
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# with other compilers
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonMODULE_FIX_PC_FLAGS= -e 's|\@symbol_visibility\@||'
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Need to use GNU Make to build due to hw/xfree86/loader
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_MAKE=$(GNUMAKE)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_MAKE_SET=yes
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Additional configure time targets beyond the defaults
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ADD_CONFIGURE_TARGETS=clear_build_date
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Additional install targets beyond the defaults
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq install_fix_paths install_docs
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Have to avoid dependency loop between install_pc_common and
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# install_pkgconfig_uninstalled
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonINSTALL_PCU_DEPS = $(INSTALL_TARGETS:install_pc_common=)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonINSTALL_PCU_DEPS_SET=yes
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Merge in additional sources from sun-src directory
9c4e79e1c3fce91054fd3d00750a48f79d123341niqADDITIONAL_SOURCE_DIR=sun-src
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Compatibility links from /usr/X11/bin to /usr/bin
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Only needed for programs that were in /usr/X11/bin before we moved
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_X11_BINCOMPAT_LINKS = Xorg Xephyr Xvfb cvt gtf
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_X11_BINCOMPAT_LINKS_i386 = amd64
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMODULE_X11_BINCOMPAT_LINKS += $(MODULE_X11_BINCOMPAT_LINKS_$(MACH))
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# now just symlinks from amd64 to parent directory
9c4e79e1c3fce91054fd3d00750a48f79d123341niqLINKED_TO_ISAEXEC = Xorg Xephyr Xvfb Xdmx
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinclude ../Makefile.inc
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Don't include build date & time in delivered binaries as it just causes
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# unnecessary binary differences to be pulled into package updates, but
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# leave it in debug builds for developer convenience
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(BUILD_DEBUG:yes=$(POUND_SIGN)) CBD_TARGET = actually_clear_build_date
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqclear_build_date: $(CBD_TARGET)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqactually_clear_build_date: $(AUTOCONF_TARGET)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton printf '#undef BUILD_DATE\n#undef BUILD_TIME\n' > \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(SOURCE_DIR)/hw/xfree86/common/xf86Build.h
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton$(XORGSERVER_BIN): default_build
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
9c4e79e1c3fce91054fd3d00750a48f79d123341niqSDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_extras: default_install
9c4e79e1c3fce91054fd3d00750a48f79d123341niq -rm -f $(SDK_INCLUDES_DIR)/xorg-server.h
9c4e79e1c3fce91054fd3d00750a48f79d123341niq sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
9c4e79e1c3fce91054fd3d00750a48f79d123341niq cp -pf $(SOURCE_DIR)/mi/mioverlay.h \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
74a027db9e9476e96b37e22c0b06407e23335e3csf mkdir -p $(PROTODIR)$(X11_MAN_DIR)/man1
9c4e79e1c3fce91054fd3d00750a48f79d123341niq cp -pf $(SOURCE_DIR)/hw/xfree86/man/xorgcfg.1 \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(SOURCE_DIR)/hw/xfree86/man/xorgconfig.1 \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(X11_MAN_DIR)/man1
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor
9c4e79e1c3fce91054fd3d00750a48f79d123341niq cp -pf $(SOURCE_DIR)/config/x11-input.fdi \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor/10-x11-input.fdi
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $(PROTODIR)/etc/X11/xorg.conf.d \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)/etc/X11/xorg.conf.avail \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)/usr/share/X11/xorg.conf.d
9c4e79e1c3fce91054fd3d00750a48f79d123341niq cp -pf 90-zap.conf $(PROTODIR)/etc/X11/xorg.conf.avail
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# builds, and install xorg-server.pc in 32-bit pkgconfig dir too
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_pc_common: default_install install_pkgconfig_uninstalled
9c4e79e1c3fce91054fd3d00750a48f79d123341niq -rm -f $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $(PROTODIR)$(PKGCONFIG_DIR)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq cp -pf $(SOURCE_DIR)/xorg-server.pc \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
9c4e79e1c3fce91054fd3d00750a48f79d123341niq -rm -f $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $(PROTODIR)$(PKGCONFIG_DIR_32)
74a027db9e9476e96b37e22c0b06407e23335e3csf ln -s ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server.pc \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server-uninstalled.pc \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(PKGCONFIG_DIR_32)/
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Generate a list of exported functions & data objects so that we can verify
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# loadable modules don't reference symbols that have been deleted or renamed.
9c4e79e1c3fce91054fd3d00750a48f79d123341niqSYMBOL_AWK_SCRIPT = \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq'BEGIN { print "\043 Functions exported by Xorg server to loadable modules" ; \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq print "\n\044mapfile_version 2\n\nSYMBOL_SCOPE {\n\tglobal:" } \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq END { print "};" } \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $$7 ~ /UNDEF|\.tdata/ { next } \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $$5 !~ /GLOB/ { next } \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $$8 ~ /^(__|_edata|_end|_etext|_start|_environ|_lib_version)/ { next } \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $$4 ~ /FUNC/ && $$7 ~ /\.text/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8 } \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $$4 ~ /OBJT/ && $$7 ~ /data|bss/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8}'
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq -rm -f $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq LC_ALL=C /usr/bin/nm -gs $(XORGSERVER_BIN) | \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq gawk -F\| $(SYMBOL_AWK_SCRIPT) > $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq cmp $(XORG_EXTERNS_FILE) $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Fix paths in proto area to match paths in packages / installed systems
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_fix_paths_X: default_install
9c4e79e1c3fce91054fd3d00750a48f79d123341niq rm -f $(PROTODIR)$(MODULE_PREFIX)/bin/X \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/X
9c4e79e1c3fce91054fd3d00750a48f79d123341niq ln -s Xserver $(PROTODIR)$(MODULE_PREFIX)/bin/X
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
74a027db9e9476e96b37e22c0b06407e23335e3csfinstall_fix_paths: install_fix_paths_X
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMESA_MODULE_DIR = /usr/lib/mesa/modules/extensions
9c4e79e1c3fce91054fd3d00750a48f79d123341niqEXT_MODULE_DIR = $(X11_SERVERMODS_DIR)/extensions
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_fix_paths_glxmodule: default_install
9c4e79e1c3fce91054fd3d00750a48f79d123341niq @rm -f $(PROTODIR)$(MESA_MODULE_DIR)/libglx.so
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $(PROTODIR)$(MESA_MODULE_DIR)/
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mv -f $(PROTODIR)$(EXT_MODULE_DIR)/libglx.so \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(MESA_MODULE_DIR)/libglx.so
9c4e79e1c3fce91054fd3d00750a48f79d123341niq ln -s ../../../../../system/volatile/opengl/server/libglx.so \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(EXT_MODULE_DIR)/libglx.so
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_fix_paths: install_fix_paths_glxmodule
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# Install metadata for Xephyr, Xvfb, Xdmx, & xtsol packages too
9c4e79e1c3fce91054fd3d00750a48f79d123341niqXCOMMON_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xserver-common)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqXEPHYR_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xephyr)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqXVFB_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xvfb)
fc42512879dd0504532f52fe5d0d0383dda96a1eniqXDMX_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xdmx)
fc42512879dd0504532f52fe5d0d0383dda96a1eniqXTSOL_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-server-xorg=%-trusted-trusted-xorg)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniqEXTRA_METADATA_DIRS = $(XCOMMON_PKG_METADATA_DIR) \
fc42512879dd0504532f52fe5d0d0383dda96a1eniq $(XEPHYR_PKG_METADATA_DIR) \
fc42512879dd0504532f52fe5d0d0383dda96a1eniq $(XVFB_PKG_METADATA_DIR) \
fc42512879dd0504532f52fe5d0d0383dda96a1eniq $(XDMX_PKG_METADATA_DIR) \
fc42512879dd0504532f52fe5d0d0383dda96a1eniq $(XTSOL_PKG_METADATA_DIR)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniqEXTRA_ATTRDATA_FILES = $(EXTRA_METADATA_DIRS:%=%/$(ATTRDATA_FILE_NAME))
fc42512879dd0504532f52fe5d0d0383dda96a1eniqEXTRA_LICENSE_FILES = $(EXTRA_METADATA_DIRS:%=%/$(LICENSE_FILE_NAME))
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniqEXTRA_METADATA_TARGETS= $(EXTRA_METADATA_DIRS) \
fc42512879dd0504532f52fe5d0d0383dda96a1eniq $(EXTRA_ATTRDATA_FILES) \
fc42512879dd0504532f52fe5d0d0383dda96a1eniq $(EXTRA_LICENSE_FILES)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniqinstall_metadata: $(EXTRA_METADATA_TARGETS)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniq$(EXTRA_ATTRDATA_FILES) $(EXTRA_LICENSE_FILES): $(EXTRA_METADATA_DIRS)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniq$(EXTRA_METADATA_DIRS):
fc42512879dd0504532f52fe5d0d0383dda96a1eniq mkdir -p $@
fc42512879dd0504532f52fe5d0d0383dda96a1eniq
fc42512879dd0504532f52fe5d0d0383dda96a1eniq# Xtsol module is covered only by Oracle copyright/license
fc42512879dd0504532f52fe5d0d0383dda96a1eniqXTSOL_LICENSE = $(XTSOL_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq$(XTSOL_LICENSE):= LICENSE_NAME = $(ORACLE_LICENSE_NAME)
fc42512879dd0504532f52fe5d0d0383dda96a1eniq$(XTSOL_LICENSE):= LICENSE_FILE = COPYING.tsol
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton$(XTSOL_LICENSE):= LICENSE_INSERT = $(ORACLE_LICENSE_INSERT)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Special compatibility links from /usr/X11/include to /usr/include
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonX11_INCLUDE_COMPAT_DIR = $(PROTODIR)/usr/X11/include
9c4e79e1c3fce91054fd3d00750a48f79d123341niqX11_INCLUDE_COMPAT_LINKS = $(X11_INCLUDE_COMPAT_DIR)/drm \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(X11_INCLUDE_COMPAT_DIR)/xorg
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall: $(X11_INCLUDE_COMPAT_LINKS)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(X11_INCLUDE_COMPAT_DIR):
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(X11_INCLUDE_COMPAT_LINKS): $(X11_INCLUDE_COMPAT_DIR)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq @rm -f $@
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton ln -s ../../include/$(@F) $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton## mdb module rules
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Build & install mdb modules & scripts that aren't integrated to
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# normal build process.
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_SOURCE_DIR=$(XORG_BUILD_DIR)/os/solaris/mdb
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_MODULE_DIR=/usr/lib/mdb/proc/$(ARCHLIBSUBDIR)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_SCRIPT_DIR=/usr/demo/Xserver/mdb
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_SCRIPTS=list_Xserver_clients \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq list_Xserver_devicegrab_client \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq list_Xserver_servergrab_client
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_MODULE_NAMES=Xephyr Xorg Xvfb Xvnc Xdmx
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqBUILT_MDB_MODULE=$(MDB_SOURCE_DIR)/modules/Xserver.so
9c4e79e1c3fce91054fd3d00750a48f79d123341niqBUILT_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(MDB_SOURCE_DIR)/scripts/%)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niqINSTALLED_MDB_LINKS=$(MDB_MODULE_NAMES:%=$(PROTODIR)$(MDB_MODULE_DIR)/%.so)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqINSTALLED_MDB_MODULE=$(PROTODIR)$(MDB_MODULE_DIR)/Xserver.so
9c4e79e1c3fce91054fd3d00750a48f79d123341niqINSTALLED_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(PROTODIR)$(MDB_SCRIPT_DIR)/%)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jortonINSTALLED_MDB_ALL=$(INSTALLED_MDB_MODULE) $(INSTALLED_MDB_LINKS) \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(INSTALLED_MDB_SCRIPTS)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton# Since configure options aren't used to build the mdb modules, pass
9c4e79e1c3fce91054fd3d00750a48f79d123341niq# those variables at build time
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_BUILD_ENV=$(CONFIG_ENV) $(BUILD_ENV)
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_BUILD_ENV += CFLAGS="$(LIB_CFLAGS)" LDFLAGS="$(LIB_LDFLAGS)"
9c4e79e1c3fce91054fd3d00750a48f79d123341niqMDB_BUILD_ENV += ARCHLIBSUBDIR="$(ARCHLIBSUBDIR)"
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqbuild_mdb: $(BUILT_MDB_MODULE)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(BUILT_MDB_SCRIPTS): $(SOURCE_TARGETS)
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq
ef82e8fa164e0a1f8b813f7deb6b7ead96018c94niq$(BUILT_MDB_MODULE): $(CONFIGURE_TARGETS)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq (cd $(MDB_SOURCE_DIR) ; \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(MDB_BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(PROTODIR)$(MDB_MODULE_DIR) $(PROTODIR)$(MDB_SCRIPT_DIR):
9c4e79e1c3fce91054fd3d00750a48f79d123341niq mkdir -p $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(INSTALLED_MDB_MODULE): $(PROTODIR)$(MDB_MODULE_DIR) $(BUILT_MDB_MODULE)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(INSTALL_SCRIPT) -c -m 0555 $(BUILT_MDB_MODULE) $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(INSTALLED_MDB_LINKS): $(PROTODIR)$(MDB_MODULE_DIR)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq @rm -f $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq ln -s Xserver.so $@
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq$(INSTALLED_MDB_SCRIPTS): $(BUILT_MDB_SCRIPTS) $(PROTODIR)$(MDB_SCRIPT_DIR)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(INSTALL_SCRIPT) -c -m 0555 $(MDB_SOURCE_DIR)/scripts/$(@F) \
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(PROTODIR)$(MDB_SCRIPT_DIR)/
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_mdb: $(INSTALLED_MDB_ALL)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(INSTALL_SCRIPT) -c -m 0444 $(MDB_SOURCE_DIR)/README \
9c4e79e1c3fce91054fd3d00750a48f79d123341niq $(PROTODIR)$(MDB_SCRIPT_DIR)/
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niq## Dtrace docs rules
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton$(DTRACE_DOC_DIR)/Xserver-DTrace.xml: $(AUTOCONF_TARGET)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq
9c4e79e1c3fce91054fd3d00750a48f79d123341niqinstall_docs: $(DTRACE_DOCS) $(PROTODIR)$(MODULE_DOC_DIR)
6449c17ae9e13c61628f5f4da8c9a95768f0e9e9jorton $(INSTALL_SCRIPT) -c -m 0444 $(DTRACE_DOCS) $(PROTODIR)$(MODULE_DOC_DIR)
9c4e79e1c3fce91054fd3d00750a48f79d123341niq