Makefile revision 1387
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync###############################################################################
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Xorg server Makefile
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync# Permission is hereby granted, free of charge, to any person obtaining a
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# copy of this software and associated documentation files (the "Software"),
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# to deal in the Software without restriction, including without limitation
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# the rights to use, copy, modify, merge, publish, distribute, sublicense,
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# and/or sell copies of the Software, and to permit persons to whom the
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Software is furnished to do so, subject to the following conditions:
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# The above copyright notice and this permission notice (including the next
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# paragraph) shall be included in all copies or substantial portions of the
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# DEALINGS IN THE SOFTWARE.
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Package name used in tarballs
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Package metadata
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncMODULE_DESC = portions of the X.Org X server software
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Version number (used in path names) - set in open-src/common/Makefile.init
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Checksums for upstream tarball
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncTARBALL_SHA1 = f67a3a250216ab40f0e31648151ee1a457b70a3a
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncTARBALL_SHA256= a5adb02571efb7d7459dde83286a3adb77dfd1a52a7348e75d2dc72d6f8d28aa
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Patches to apply to source after unpacking, in order
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# to allow for different source layouts
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# ARC cases that covered this module
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2004/187 Xorg Server for Solaris
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2004/685 Xorg server upgrade to X11R6.8 release
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2004/829 Xorg 6.8.2 server upgrade for Solaris
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2005/450 Xorg 6.9 for Solaris
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2006/609 Xserver provider for DTrace
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2007/051 Xorg server upgrade to 7.2
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2007/434 Xorg server 1.3
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2007/500 X11 MIT-SHM Extension across zones
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2008/294 Xorg driver selection based on VIS_GETIDENTIFIER
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2009/021 Xorg server 1.5
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2009/292 Xorg server 1.6
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2009/679 Xorg server 1.7
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2010/109 Introduce libXcb in Solaris
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2011/008 Xorg server 1.9
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2010/382 Removal of 32-bit X servers
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2011/214 Xorg server 1.10
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2012/144 Xorg server 1.12
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2012/320 Xorg server 1.13
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# PSARC/2013/091 Xorg server 1.14
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Man pages to apply Sun footer to & attributes to list
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsync# Override specific attributes for specific man pages
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsync $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsync# Xephyr, Xvfb, and Xdmx are split out into their own packages
0e5731ab59b4ecead38375f26eeea698f00b19fdvboxsyncSUNTOUCH_MAN_FLAGS_Xephyr = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xephyr)}'
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncSUNTOUCH_MAN_FLAGS_Xvfb = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xvfb)}'
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncSUNTOUCH_MAN_FLAGS_Xdmx = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xdmx)}'
a7aa94e0115a73841f34ebbfa00f63fa1904e51fvboxsyncSUNTOUCH_MAN_FLAGS_Xserver = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xserver-common)}'
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Binary built in tree
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsyncBUILD_TARGETS=$(XORGSERVER_BIN) build_mdb set-elf-comments \
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Need to convert dtrace docs from xml to text/html ourselves, since
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Solaris doesn't bundle the xmlto tool used upstream
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Need to regenerate autoconf/automake files after patching
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Command line options to GNU autoconf configure script
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# XXX: --disable-dga
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Pass linker mapfile listing symbols that modules can count on resolving
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# from the Xorg binary itself
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncXORG_EXTERNS_FLAG = -Wl,-M,$(PWD)/$(XORG_EXTERNS_FILE)
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncMODULE_BUILD_ENV = XORG_EXTERNS_FLAG='$(XORG_EXTERNS_FLAG)'
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Optimization doesn't always remove unused inline functions, leaving many
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# binaries referencing pixman symbols that normally don't need them. Using
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# -z ignore should ensure that it's not added when not really needed.
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Adding -z muldefs for 16418361 - which should be removed once we fix that
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncMODULE_CONFIG_OPTS += LIBS="-z ignore -lpixman-1 -z muldefs"
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# pkg-config files that need to have -R added
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Remove compiler specific visibility flag that breaks builds of drivers
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# with other compilers
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Need to use GNU Make to build due to hw/xfree86/loader
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Additional configure time targets beyond the defaults
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Additional install targets beyond the defaults
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncMODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Have to avoid dependency loop between install_pc_common and
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# install_pkgconfig_uninstalled
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncINSTALL_PCU_DEPS = $(INSTALL_TARGETS:install_pc_common=)
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Merge in additional sources from sun-src directory
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Only needed for programs that were in /usr/X11/bin before we moved
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncMODULE_X11_BINCOMPAT_LINKS = Xorg Xephyr Xvfb cvt gtf
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncMODULE_X11_BINCOMPAT_LINKS += $(MODULE_X11_BINCOMPAT_LINKS_$(MACH))
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# now just symlinks from amd64 to parent directory
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Don't include build date & time in delivered binaries as it just causes
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# unnecessary binary differences to be pulled into package updates, but
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# leave it in debug builds for developer convenience
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync$(BUILD_DEBUG:yes=$(POUND_SIGN)) CBD_TARGET = actually_clear_build_date
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync printf '#undef BUILD_DATE\n#undef BUILD_TIME\n' > \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncSDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync mkdir -p $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor/10-x11-input.fdi
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync cp -pf 90-zap.conf $(PROTODIR)/etc/X11/xorg.conf.avail
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
d67d8d3162b0d9cac99842fc7da74e8371453046vboxsync# builds, and install xorg-server.pc in 32-bit pkgconfig dir too
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncinstall_pc_common: default_install install_pkgconfig_uninstalled
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync -rm -f $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync ln -s ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server.pc \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server-uninstalled.pc \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Generate a list of exported functions & data objects so that we can verify
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# loadable modules don't reference symbols that have been deleted or renamed.
f1630a6818621238c9c2338394b44995e318e108vboxsync'BEGIN { print "\043 Functions exported by Xorg server to loadable modules" ; \
f1630a6818621238c9c2338394b44995e318e108vboxsync print "\n\044mapfile_version 2\n\nSYMBOL_SCOPE {\n\tglobal:" } \
f1630a6818621238c9c2338394b44995e318e108vboxsync END { print "};" } \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $$7 ~ /UNDEF|\.tdata/ { next } \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $$5 !~ /GLOB/ { next } \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $$8 ~ /^(__|_edata|_end|_etext|_start|_environ|_lib_version)/ { next } \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $$4 ~ /FUNC/ && $$7 ~ /\.text/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8 } \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync $$4 ~ /OBJT/ && $$7 ~ /data|bss/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8}'
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# cmp $(XORG_EXTERNS_FILE) $@
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Fix paths in proto area to match paths in packages / installed systems
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync ln -s ../../../../../system/volatile/opengl/server/libglx.so \
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsync# Install metadata for Xephyr, Xvfb, Xdmx, & xtsol packages too
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncXCOMMON_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xserver-common)
6831f283dbc5c27bde8a8f8bea179b84a5741697vboxsyncXEPHYR_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xephyr)
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncXVFB_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xvfb)
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncXDMX_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xdmx)
37136b5ecb07042e5ba50f86849a79d1cba5d5f1vboxsyncXTSOL_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-server-xorg=%-trusted-trusted-xorg)
$(EXTRA_ATTRDATA_FILES) \
mkdir -p $@
mkdir -p $@
@rm -f $@
mkdir -p $@
@rm -f $@
mkdir -p $@