Makefile revision 1124
98N/A###############################################################################
98N/A#
1111N/A# Xorg server Makefile
98N/A#
235N/A# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
919N/A#
919N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
493N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
493N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
235N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
98N/A# DEALINGS IN THE SOFTWARE.
98N/A#
98N/A#
98N/A
98N/A# Package name used in tarballs
98N/AMODULE_NAME=xorg-server
1123N/A
241N/A# Version number (used in path names)
520N/AMODULE_VERSION=$(XORGSERVER_VERS)
520N/A
1123N/A# Checksums for upstream tarball
1123N/ATARBALL_MD5 = 75f117c74f2ecaf9dd167f6a66ac98de
98N/ATARBALL_SHA1 = 59ada4c9a59f7f1eb4b68c359e9cd58272aa4809
98N/A
98N/A# Patches to apply to source after unpacking, in order
98N/A# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
1123N/ASOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
98N/A
98N/A# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
98N/A# to allow for different source layouts
1123N/AXORG_BUILD_DIR=$(SOURCE_DIR)
1123N/A
1123N/A# ARC cases that covered this module
241N/A# PSARC/2004/187 Xorg Server for Solaris
1123N/AMODULE_ARC_CASES = PSARC/2004/187
1123N/A# PSARC/2004/685 Xorg server upgrade to X11R6.8 release
1123N/AMODULE_ARC_CASES += PSARC/2004/685
1123N/A# PSARC/2004/829 Xorg 6.8.2 server upgrade for Solaris
1123N/AMODULE_ARC_CASES += PSARC/2004/829
241N/A# PSARC/2005/450 Xorg 6.9 for Solaris
1123N/AMODULE_ARC_CASES += PSARC/2005/450
520N/A# PSARC/2006/609 Xserver provider for DTrace
493N/AMODULE_ARC_CASES += PSARC/2006/609
493N/A# PSARC/2007/051 Xorg server upgrade to 7.2
493N/AMODULE_ARC_CASES += PSARC/2007/051
493N/A# PSARC/2007/434 Xorg server 1.3
493N/AMODULE_ARC_CASES += PSARC/2007/434
493N/A# PSARC/2007/500 X11 MIT-SHM Extension across zones
577N/AMODULE_ARC_CASES += PSARC/2007/500
493N/A# PSARC/2008/294 Xorg driver selection based on VIS_GETIDENTIFIER
493N/AMODULE_ARC_CASES += PSARC/2008/294
1123N/A# PSARC/2009/021 Xorg server 1.5
1123N/AMODULE_ARC_CASES += PSARC/2009/021
1123N/A# PSARC/2009/292 Xorg server 1.6
1123N/AMODULE_ARC_CASES += PSARC/2009/292
1123N/A# PSARC/2009/679 Xorg server 1.7
1123N/AMODULE_ARC_CASES += PSARC/2009/679
1123N/A# PSARC/2010/109 Introduce libXcb in Solaris
1123N/AMODULE_ARC_CASES += PSARC/2010/109
1123N/A# PSARC/2011/008 Xorg server 1.9
1123N/AMODULE_ARC_CASES += PSARC/2011/008
1123N/A# PSARC/2010/382 Removal of 32-bit X servers
577N/AMODULE_ARC_CASES += PSARC/2010/382
577N/A# PSARC/2011/214 Xorg server 1.10
577N/AMODULE_ARC_CASES += PSARC/2011/214
577N/A
577N/A# Man pages to apply Sun footer to & attributes to list
577N/ASUNTOUCHED_MANPAGES= \
577N/A doc/man/Xserver.man \
577N/A hw/kdrive/ephyr/man/Xephyr.man \
577N/A hw/xfree86/utils/man/cvt.man \
1029N/A hw/xfree86/utils/man/gtf.man \
1029N/A hw/xfree86/doc/man/Xorg.man \
1029N/A hw/xfree86/doc/man/xorg.conf.man \
1029N/A hw/xfree86/doc/man/xorg.conf.d.man \
1029N/A hw/vfb/man/Xvfb.man
1029N/A
1029N/AMODULE_STABILITY=Volatile
1029N/A
1029N/A# Override specific attributes for specific man pages
1029N/AMODULE_SUNTOUCH_MAN_FLAGS= \
493N/A $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
235N/A# Xephyr, Xvfb, and Xdmx are split out into their own packages
493N/ASUNTOUCH_MAN_FLAGS_Xephyr = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xephyr)}'
98N/ASUNTOUCH_MAN_FLAGS_Xvfb = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xvfb)}'
235N/ASUNTOUCH_MAN_FLAGS_Xdmx = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xdmx)}'
235N/ASUNTOUCH_MAN_FLAGS_Xserver = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xserver-common)}'
98N/A
98N/A# Binary built in tree
493N/AXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
577N/A
577N/ABUILD_TARGETS=$(XORGSERVER_BIN) build_mdb set-elf-comments \
1029N/A $(BUILD_DIR)/mapfile-Xorg-externs
577N/ABUILD_TARGETS_SET=yes
493N/A
493N/A# Need to regenerate autoconf/automake files after patching
493N/AAUTORECONF=yes
493N/A
98N/A# Command line options to GNU autoconf configure script
577N/A# Need to override LD setting to add -xarch flags that libtool strips
1029N/A# XXX: --disable-dga
577N/AMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
577N/A --enable-dmx \
577N/A --enable-builddocs \
493N/A --enable-kdrive --enable-xephyr --disable-xsdl \
493N/A MKFONTDIR="$(MKFONTDIR)" \
493N/A MKFONTSCALE="$(MKFONTSCALE)" \
520N/A LD="$(CC) $(ARCH_FLAGS)"
577N/A
577N/AMODULE_LDFLAGS = $(XSERVER_LDFLAGS)
577N/AMODULE_LD_OPTIONS = $(MAPFILES_FOR_ALL)
1029N/A
98N/A# pkg-config files that need to have -R added
493N/AFIX_PC_FILES=xorg-server.pc.in
98N/A# Remove compiler specific visibility flag that breaks builds of drivers
235N/A# with other compilers
98N/AMODULE_FIX_PC_FLAGS= -e 's|\@symbol_visibility\@||'
1029N/A
1029N/A# Need to use GNU Make to build due to hw/xfree86/loader
1029N/AMODULE_MAKE=$(GNUMAKE)
1029N/AMODULE_MAKE_SET=yes
1029N/A
1029N/A# Additional install targets beyond the defaults
1029N/AMODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common \
1029N/A install_fix_paths
1029N/A
1029N/A# Have to avoid dependency loop between install_pc_common and
577N/A# install_pkgconfig_uninstalled
577N/AINSTALL_PCU_DEPS = $(INSTALL_TARGETS:install_pc_common=)
1029N/AINSTALL_PCU_DEPS_SET=yes
1029N/A
577N/A# Merge in additional sources from sun-src directory
577N/AADDITIONAL_SOURCE_DIR=sun-src
577N/A
577N/A# Compatibility links from /usr/X11/bin to /usr/bin
577N/A# Only needed for programs that were in /usr/X11/bin before we moved
577N/AMODULE_X11_BINCOMPAT_LINKS = Xorg Xephyr Xvfb cvt gtf
577N/AMODULE_X11_BINCOMPAT_LINKS_i386 = amd64
577N/AMODULE_X11_BINCOMPAT_LINKS += $(MODULE_X11_BINCOMPAT_LINKS_$(MACH))
577N/A
577N/A# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
577N/A# now just symlinks from amd64 to parent directory
577N/ALINKED_TO_ISAEXEC = Xorg Xephyr Xvfb Xdmx
577N/A
577N/Ainclude ../Makefile.inc
577N/A
577N/A$(XORGSERVER_BIN): default_build
577N/A
577N/ASDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
577N/A
577N/Ainstall_extras: default_install
577N/A -rm -f $(SDK_INCLUDES_DIR)/xorg-server.h
577N/A sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
577N/A $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
577N/A cp -pf $(SOURCE_DIR)/mi/mioverlay.h \
577N/A $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h \
577N/A $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
577N/A mkdir -p $(PROTODIR)$(X11_MAN_DIR)/man1
577N/A cp -pf $(SOURCE_DIR)/hw/xfree86/doc/man/xorgcfg.1 \
493N/A $(SOURCE_DIR)/hw/xfree86/doc/man/xorgconfig.1 \
98N/A $(PROTODIR)$(X11_MAN_DIR)/man1
98N/A mkdir -p $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor
98N/A cp -pf $(SOURCE_DIR)/config/x11-input.fdi \
493N/A $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor/10-x11-input.fdi
493N/A mkdir -p $(PROTODIR)/etc/X11/xorg.conf.d \
493N/A $(PROTODIR)/etc/X11/xorg.conf.avail \
493N/A $(PROTODIR)/usr/share/X11/xorg.conf.d
493N/A cp -pf 90-zap.conf $(PROTODIR)/etc/X11/xorg.conf.avail
493N/A
493N/A# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
493N/A# builds, and install xorg-server.pc in 32-bit pkgconfig dir too
493N/Ainstall_pc_common: default_install install_pkgconfig_uninstalled
493N/A -rm -f $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
493N/A mkdir -p $(PROTODIR)$(PKGCONFIG_DIR)
493N/A cp -pf $(SOURCE_DIR)/xorg-server.pc \
493N/A $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
493N/A -rm -f $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc \
493N/A $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
493N/A mkdir -p $(PROTODIR)$(PKGCONFIG_DIR_32)
493N/A ln -s ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server.pc \
493N/A ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server-uninstalled.pc \
493N/A $(PROTODIR)$(PKGCONFIG_DIR_32)/
493N/A
493N/A$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
493N/A -rm -f $@
493N/A printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
493N/A printf '{\n global:\n' >> $@
493N/A /usr/ccs/bin/nm -g $(XORGSERVER_BIN) $(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)/libXfont.so | grep -v UNDEF | sed -n -e 's/^.*\|FUNC \|GLOB \|.*\|\([A-Za-z].*\)$$/ \1 = FUNCTION extern;/p' -e 's/^.*\|OBJT \|GLOB \|.*\|\([A-Za-z].*\)$$/ \1 = DATA extern;/p' >> $@
1054N/A printf '};\n' >> $@
493N/A
493N/A# Fix paths in proto area to match paths in packages / installed systems
493N/Ainstall_fix_paths_X: default_install
493N/A rm -f $(PROTODIR)$(MODULE_PREFIX)/bin/X \
493N/A $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/X
493N/A ln -s Xserver $(PROTODIR)$(MODULE_PREFIX)/bin/X
493N/A
493N/Ainstall_fix_paths: install_fix_paths_X
493N/A
493N/AMESA_MODULE_DIR = /usr/lib/mesa/modules/extensions
493N/AEXT_MODULE_DIR = $(X11_SERVERMODS_DIR)/extensions
493N/A
493N/Ainstall_fix_paths_glxmodule: default_install
493N/A @rm -f $(PROTODIR)$(MESA_MODULE_DIR)/libglx.so
493N/A mkdir -p $(PROTODIR)$(MESA_MODULE_DIR)/
493N/A mv -f $(PROTODIR)$(EXT_MODULE_DIR)/libglx.so \
493N/A $(PROTODIR)$(MESA_MODULE_DIR)/libglx.so
493N/A ln -s ../../../../../var/run/opengl/server/libglx.so \
493N/A $(PROTODIR)$(EXT_MODULE_DIR)/libglx.so
493N/A
493N/Ainstall_fix_paths: install_fix_paths_glxmodule
493N/A
493N/A# Install metadata for Xephyr, Xvfb, Xdmx, & xtsol packages too
493N/AXCOMMON_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xserver-common)
493N/AXEPHYR_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xephyr)
851N/AXVFB_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xvfb)
493N/AXDMX_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xdmx)
493N/AXTSOL_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-server-xorg=%-trusted-trusted-xorg)
493N/A
684N/AEXTRA_METADATA_DIRS = $(XCOMMON_PKG_METADATA_DIR) \
493N/A $(XEPHYR_PKG_METADATA_DIR) \
493N/A $(XVFB_PKG_METADATA_DIR) \
493N/A $(XDMX_PKG_METADATA_DIR) \
493N/A $(XTSOL_PKG_METADATA_DIR)
493N/A
851N/AEXTRA_ATTRDATA_FILES = $(EXTRA_METADATA_DIRS:%=%/$(ATTRDATA_FILE_NAME))
493N/AEXTRA_LICENSE_FILES = $(EXTRA_METADATA_DIRS:%=%/$(LICENSE_FILE_NAME))
493N/A
493N/AEXTRA_METADATA_TARGETS= $(EXTRA_METADATA_DIRS) \
493N/A $(EXTRA_ATTRDATA_FILES) \
493N/A $(EXTRA_LICENSE_FILES)
493N/A
493N/Ainstall_metadata: $(EXTRA_METADATA_TARGETS)
493N/A
493N/A$(EXTRA_ATTRDATA_FILES) $(EXTRA_LICENSE_FILES): $(EXTRA_METADATA_DIRS)
493N/A
493N/A$(EXTRA_METADATA_DIRS):
493N/A mkdir -p $@
493N/A
493N/A# Xtsol module is covered only by Oracle copyright/license
493N/AXTSOL_LICENSE = $(XTSOL_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
493N/A$(XTSOL_LICENSE):= LICENSE_NAME = $(ORACLE_LICENSE_NAME)
493N/A$(XTSOL_LICENSE):= LICENSE_FILE = COPYING.tsol
493N/A$(XTSOL_LICENSE):= LICENSE_APPEND = $(ORACLE_LICENSE_APPEND)
493N/A
493N/A# Special compatibility links from /usr/X11/include to /usr/include
520N/AX11_INCLUDE_COMPAT_DIR = $(PROTODIR)/usr/X11/include
520N/AX11_INCLUDE_COMPAT_LINKS = $(X11_INCLUDE_COMPAT_DIR)/drm \
520N/A $(X11_INCLUDE_COMPAT_DIR)/xorg
520N/A
520N/Ainstall: $(X11_INCLUDE_COMPAT_LINKS)
520N/A
577N/A$(X11_INCLUDE_COMPAT_DIR):
577N/A mkdir -p $@
493N/A
493N/A$(X11_INCLUDE_COMPAT_LINKS): $(X11_INCLUDE_COMPAT_DIR)
577N/A @rm -f $@
493N/A ln -s ../../include/$(@F) $@
493N/A
493N/A## mdb module rules
577N/A# Build & install mdb modules & scripts that aren't integrated to
493N/A# normal build process.
493N/AMDB_SOURCE_DIR=$(XORG_BUILD_DIR)/os/solaris/mdb
493N/AMDB_MODULE_DIR=/usr/lib/mdb/proc/$(ARCHLIBSUBDIR)
493N/AMDB_SCRIPT_DIR=/usr/demo/Xserver/mdb
493N/AMDB_SCRIPTS=list_Xserver_clients \
493N/A list_Xserver_devicegrab_client \
493N/A list_Xserver_servergrab_client
493N/AMDB_MODULE_NAMES=Xephyr Xorg Xvfb Xvnc Xdmx
493N/A
493N/ABUILT_MDB_MODULE=$(MDB_SOURCE_DIR)/modules/Xserver.so
493N/ABUILT_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(MDB_SOURCE_DIR)/scripts/%)
493N/A
493N/AINSTALLED_MDB_LINKS=$(MDB_MODULE_NAMES:%=$(PROTODIR)$(MDB_MODULE_DIR)/%.so)
493N/AINSTALLED_MDB_MODULE=$(PROTODIR)$(MDB_MODULE_DIR)/Xserver.so
493N/AINSTALLED_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(PROTODIR)$(MDB_SCRIPT_DIR)/%)
1111N/AINSTALLED_MDB_ALL=$(INSTALLED_MDB_MODULE) $(INSTALLED_MDB_LINKS) \
684N/A $(INSTALLED_MDB_SCRIPTS)
493N/A
493N/A# Since configure options aren't used to build the mdb modules, pass
493N/A# those variables at build time
493N/AMDB_BUILD_ENV=$(CONFIG_ENV) $(BUILD_ENV)
493N/A
493N/Abuild_mdb: $(BUILT_MDB_MODULE)
493N/A
493N/A$(BUILT_MDB_SCRIPTS): $(SOURCE_TARGETS)
493N/A
493N/A$(BUILT_MDB_MODULE): $(CONFIGURE_TARGETS)
493N/A (cd $(MDB_SOURCE_DIR) ; \
493N/A $(MDB_BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
493N/A
493N/A$(PROTODIR)$(MDB_MODULE_DIR) $(PROTODIR)$(MDB_SCRIPT_DIR):
493N/A mkdir -p $@
493N/A
493N/A$(INSTALLED_MDB_MODULE): $(PROTODIR)$(MDB_MODULE_DIR) $(BUILT_MDB_MODULE)
493N/A $(INSTALL_SCRIPT) -c -m 0555 $(BUILT_MDB_MODULE) $@
493N/A
493N/A$(INSTALLED_MDB_LINKS): $(PROTODIR)$(MDB_MODULE_DIR)
493N/A @rm -f $@
493N/A ln -s Xserver.so $@
493N/A
493N/A$(INSTALLED_MDB_SCRIPTS): $(BUILT_MDB_SCRIPTS) $(PROTODIR)$(MDB_SCRIPT_DIR)
493N/A $(INSTALL_SCRIPT) -c -m 0555 $(MDB_SOURCE_DIR)/scripts/$(@F) \
493N/A $(PROTODIR)$(MDB_SCRIPT_DIR)/
493N/A
493N/Ainstall_mdb: $(INSTALLED_MDB_ALL)
493N/A $(INSTALL_SCRIPT) -c -m 0444 $(MDB_SOURCE_DIR)/README \
493N/A $(PROTODIR)$(MDB_SCRIPT_DIR)/
493N/A