Makefile revision 970
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza###############################################################################
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Xorg server Makefile
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Permission is hereby granted, free of charge, to any person obtaining a
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# copy of this software and associated documentation files (the "Software"),
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# to deal in the Software without restriction, including without limitation
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# the rights to use, copy, modify, merge, publish, distribute, sublicense,
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# and/or sell copies of the Software, and to permit persons to whom the
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# Software is furnished to do so, subject to the following conditions:
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# The above copyright notice and this permission notice (including the next
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# paragraph) shall be included in all copies or substantial portions of the
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
4f14b0f29aa144cc03efdde5508ae126ae197acfWyllys Ingersoll# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8d0c3d29bb99f6521f2dc5058a7e4debebad7899Garrett D'Amore# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
ead1f93ee620d7580f7e53350fe5a884fc4f158aLiane Praza# DEALINGS IN THE SOFTWARE.
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Build 32-bit or 64-bit?
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Package name used in tarballs
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Version number (used in path names)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Checksums for upstream tarball
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashTARBALL_SHA1 = 0f1b71363843b7e394d6de62d0db5b74d3e645ef
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Patches to apply to source after unpacking, in order
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# to allow for different source layouts
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# ARC cases that covered this module
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2004/187 Xorg Server for Solaris
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2004/685 Xorg server upgrade to X11R6.8 release
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2004/829 Xorg 6.8.2 server upgrade for Solaris
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2005/450 Xorg 6.9 for Solaris
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2006/609 Xserver provider for DTrace
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2007/051 Xorg server upgrade to 7.2
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2007/434 Xorg server 1.3
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2007/500 X11 MIT-SHM Extension across zones
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2008/294 Xorg driver selection based on VIS_GETIDENTIFIER
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2009/021 Xorg server 1.5
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2009/292 Xorg server 1.6
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# PSARC/2009/679 Xorg server 1.7
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Man pages to apply Sun footer to & attributes to list
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# XXX: Need to adjust some of these to correct packages/stability
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Override specific attributes for specific man pages
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Xephyr & Xvfb are split out into their own packages
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashSUNTOUCH_MAN_FLAGS_Xephyr = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xephyr)}'
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashSUNTOUCH_MAN_FLAGS_Xvfb = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xvfb)}'
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Binary built in tree
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashBUILD_TARGETS=$(XORGSERVER_BIN) build_mdb set-elf-comments \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Need to regenerate autoconf/automake files after patching
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Command line options to GNU autoconf configure script
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Need to override LD setting to add -xarch flags that libtool strips
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# XXX: --disable-dga
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash --enable-kdrive --enable-xephyr --disable-xsdl \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# pkg-config files that need to have -R added
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Remove compiler specific visibility flag that breaks builds of drivers
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# with other compilers
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashMODULE_FIX_PC_FLAGS= -e 's|\@symbol_visibility\@||'
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Need to use GNU Make to build due to hw/xfree86/loader
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Additional install targets beyond the defaults
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashMODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashMODULE_ADD_INSTALL_TARGETS += $(EXTRA_INSTALL_$(MACH))
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Have to avoid dependency loop between install_pc_copy and
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# install_pkgconfig_uninstalled
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashINSTALL_PCU_DEPS = $(INSTALL_TARGETS:install_pc_copy=)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Merge in additional sources from sun-src directory
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Compatibility links from /usr/X11/bin to /usr/bin
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashMODULE_X11_BINCOMPAT_LINKS = $(XSERVERS) cvt gtf
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashMODULE_X11_BINCOMPAT_LINKS += $(MODULE_X11_BINCOMPAT_LINKS_$(MACH))
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashSDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash#ifdef _LP64\
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash#define _XSERVER64 1\
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash cp -pf $(SOURCE_DIR)/mi/mioverlay.h $(SDK_INCLUDES_DIR)/mioverlay.h
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash cp -pf $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(SDK_INCLUDES_DIR)/xf86Sbus.h
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash cp -pf $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash -rm -f $(SDK_INCLUDES_DIR)/xf1bpp.h $(SDK_INCLUDES_DIR)/xf4bpp.h
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash cp -pf $(SOURCE_DIR)/hw/xfree86/doc/man/xorgcfg.1 \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(SOURCE_DIR)/hw/xfree86/doc/man/xorgconfig.1 \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash mkdir -p $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor/10-x11-input.fdi
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash -rm -f $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_pc_copy: install_pc_common install_pkgconfig_uninstalled
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash -rm -f $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash ln -s ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server.pc \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server-uninstalled.pc \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash /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' >> $@
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Fix paths in proto area to match paths in packages / installed systems
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths: install_fix_paths_$(MACH)_$(BUILD_TYPE) install_fix_paths_X
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_$(MACH)_: $(BUILD_TYPES:%=install_fix_paths_$(MACH)_%)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_i386_32: install_fix_paths_use_utilities
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_i386_64: install_fix_paths_remove_utilities
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_use_utilities: default_install
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash mv -f $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/cvt \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/gtf \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_remove_utilities: default_install
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash rm -f $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/cvt \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/gtf
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash $(PROTODIR)$(MODULE_PREFIX)/bin/$(ARCHBINSUBDIR)/X
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash ln -s Xserver $(PROTODIR)$(MODULE_PREFIX)/bin/X
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashXSERVER_LINKS = $(XSERVERS:%=$(PROTODIR)$(MODULE_PREFIX)/bin/%)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_i386_32: install_fix_paths_Xservers_isaexec
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_fix_paths_Xservers_isaexec: $(XSERVER_LINKS)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashMESA_MODULE_DIR = /usr/lib/mesa/modules/extensions$(SERVERMOD_subdir)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashEXT_MODULE_DIR = $(X11_SERVERMODS_DIR)/extensions$(SERVERMOD_subdir)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash ln -s ../../../../..$(SERVERMOD_subdir:$(SUBDIR64)=..)/var/run/opengl/server/$(SERVERMOD_subdir)/libglx.so \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Install metadata for Xephyr, Xvfb, & xtsol packages too
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashXEPHYR_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xephyr)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashXVFB_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xvfb)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashXTSOL_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-server-xorg=%-trusted-trusted-xorg)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashEXTRA_METADATA_DIRS = $(XEPHYR_PKG_METADATA_DIR) \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashEXTRA_ATTRDATA_FILES = $(EXTRA_METADATA_DIRS:%=%/$(ATTRDATA_FILE_NAME))
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashEXTRA_LICENSE_FILES = $(EXTRA_METADATA_DIRS:%=%/$(LICENSE_FILE_NAME))
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashEXTRA_METADATA_TARGETS= $(EXTRA_METADATA_DIRS) \
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash$(EXTRA_ATTRDATA_FILES) $(EXTRA_LICENSE_FILES): $(EXTRA_METADATA_DIRS)
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Special compatibility link from /usr/X11/bin/i386 to /usr/bin/i86
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveashinstall_i386_bincompat_link: $(X11_BINCOMPAT_DIR)/i386
4890a7493fa5781f7cd15fa207cbcb58cc418882Will Fiveash# Special compatibility links from /usr/X11/include to /usr/include
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashX11_INCLUDE_COMPAT_DIR = $(PROTODIR)/usr/X11/include
4890a7493fa5781f7cd15fa207cbcb58cc418882Will FiveashX11_INCLUDE_COMPAT_LINKS = $(X11_INCLUDE_COMPAT_DIR)/drm \