Makefile revision 1523
###############################################################################
#
# Xorg server Makefile
#
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
#
# Package name used in tarballs
# Package metadata
# Version number (used in path names) - set in open-src/common/Makefile.init
# Checksums for upstream tarball
# Patches to apply to source after unpacking, in order
# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
# to allow for different source layouts
# ARC cases that covered this module
# PSARC/2004/187 Xorg Server for Solaris
# PSARC/2004/685 Xorg server upgrade to X11R6.8 release
# PSARC/2004/829 Xorg 6.8.2 server upgrade for Solaris
# PSARC/2005/450 Xorg 6.9 for Solaris
# PSARC/2006/609 Xserver provider for DTrace
# PSARC/2007/051 Xorg server upgrade to 7.2
# PSARC/2007/434 Xorg server 1.3
# PSARC/2007/500 X11 MIT-SHM Extension across zones
# PSARC/2008/294 Xorg driver selection based on VIS_GETIDENTIFIER
# PSARC/2009/021 Xorg server 1.5
# PSARC/2009/292 Xorg server 1.6
# PSARC/2009/679 Xorg server 1.7
# PSARC/2010/109 Introduce libXcb in Solaris
# PSARC/2011/008 Xorg server 1.9
# PSARC/2010/382 Removal of 32-bit X servers
# PSARC/2011/214 Xorg server 1.10
# PSARC/2012/144 Xorg server 1.12
# PSARC/2012/320 Xorg server 1.13
# PSARC/2013/091 Xorg server 1.14
# Man pages to apply Sun footer to & attributes to list
# Override specific attributes for specific man pages
# Xephyr, Xvfb, and Xdmx are split out into their own packages
SUNTOUCH_MAN_FLAGS_Xephyr = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xephyr)}'
SUNTOUCH_MAN_FLAGS_Xvfb = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xvfb)}'
SUNTOUCH_MAN_FLAGS_Xdmx = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xdmx)}'
SUNTOUCH_MAN_FLAGS_Xserver = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xserver-common)}'
SUNTOUCH_MAN_FLAGS_cvt = -o '{Availability, x11/modeline-utilities}'
SUNTOUCH_MAN_FLAGS_gtf = -o '{Availability, x11/modeline-utilities}'
# Binary built in tree
# Solaris doesn't bundle the xmlto tool used upstream
BUILD_TARGETS += $(DTRACE_DOCS)
# Command line options to GNU autoconf configure script
# XXX: --disable-dga
# Pass linker mapfile listing symbols that modules can count on resolving
# from the Xorg binary itself
# Disable direct binding in shared objects, since it breaks libglx.so
# Optimization doesn't always remove unused inline functions, leaving many
# binaries referencing pixman symbols that normally don't need them. The
# $(ZDISCARD_UNUSED_DEP) in LD_OPTIONS should avoid adding it when
# not really needed.
# pkg-config files that need to have -R added
# Remove compiler specific visibility flag that breaks builds of drivers
# with other compilers
MODULE_FIX_PC_FLAGS= -e 's|\@symbol_visibility\@||'
# Additional configure time targets beyond the defaults
# Additional install targets beyond the defaults
# Have to avoid dependency loop between install_pc_common and
# install_pkgconfig_uninstalled
# Merge in additional sources from sun-src directory
# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
# now just symlinks from amd64 to parent directory
# Don't include build date & time in delivered binaries as it just causes
# unnecessary binary differences to be pulled into package updates, but
# leave it in debug builds for developer convenience
printf '#undef BUILD_DATE\n#undef BUILD_TIME\n' > \
sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
# builds, and install xorg-server.pc in 32-bit pkgconfig dir too
$(PROTODIR)$(PKGCONFIG_DIR_32)/
# Generate a list of exported functions & data objects so that we can verify
# loadable modules don't reference symbols that have been deleted or renamed.
'BEGIN { print "\043 Functions exported by Xorg server to loadable modules" ; \
print "\n\044mapfile_version 2\n\nSYMBOL_SCOPE {\n\tglobal:" } \
END { print "};" } \
$$7 ~ /UNDEF|\.tdata/ { next } \
$$5 !~ /GLOB/ { next } \
$$8 ~ /^(__|_edata|_end|_etext|_start|_environ|_lib_version)/ { next } \
$$4 ~ /FUNC/ && $$7 ~ /\.text/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8 } \
$$4 ~ /OBJT/ && $$7 ~ /data|bss/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8}'
-rm -f $@
gawk -F\| $(SYMBOL_AWK_SCRIPT) > $@
# cmp $(XORG_EXTERNS_FILE) $@
# Fix paths in proto area to match paths in packages / installed systems
# Install metadata for Xephyr, Xvfb, Xdmx, & xtsol packages too
$(EXTRA_ATTRDATA_FILES) \
mkdir -p $@
mkdir -p $@
@rm -f $@
## mdb module rules
# Build & install mdb modules & scripts that aren't integrated to
# normal build process.
MDB_REL_SOURCE_DIR = ../../../../$(MDB_SOURCE_DIR)
# Since configure options aren't used to build the mdb modules, pass
# those variables at build time
$(BUILT_MDB_SCRIPTS): $(SOURCE_TARGETS)
mkdir -p $(MDB_BUILD_DIR)
mkdir -p $@
@rm -f $@
ln -s Xserver.so $@
$(PROTODIR)$(MDB_SCRIPT_DIR)/
$(PROTODIR)$(MDB_SCRIPT_DIR)/
## Dtrace docs rules
$(PROTODIR)$(RELNOTES_DIR):
mkdir -p $@
$(PROTODIR)$(RELNOTES_DIR)