Makefile revision 1634
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews###############################################################################
297be3708069ef31814d6d75c0d71a50a78feb03Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Xorg server Makefile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# copy of this software and associated documentation files (the "Software"),
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to deal in the Software without restriction, including without limitation
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and/or sell copies of the Software, and to permit persons to whom the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Software is furnished to do so, subject to the following conditions:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The above copyright notice and this permission notice (including the next
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# paragraph) shall be included in all copies or substantial portions of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Software.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# DEALINGS IN THE SOFTWARE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Package name used in tarballs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_NAME=xorg-server
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Package metadata
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_DESC = portions of the X.Org X server software
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGIT_URL = $(XORG_GIT_URL)/xserver
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGIT_URL_SET = yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Version number (used in path names) - set in open-src/common/Makefile.init
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_VERSION=$(XORGSERVER_VERS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Checksums for upstream tarball
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_MD5 = 043d720bf2472a65bb8f0daa97f83dfa
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_SHA1 = b3d8818bb3e1deeeb8f02d741c1223a72182e63c
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTARBALL_SHA256= ea739c22517cdbe2b5f7c0a5fd05fe8a10ac0629003e71c0c7862f4bb60142cd
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Patches to apply to source after unpacking, in order
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to allow for different source layouts
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic UpdaterXORG_SOURCE_DIR=$(SOURCE_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXORG_BUILD_DIR=$(BUILD_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# ARC cases that covered this module
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2004/187 Xorg Server for Solaris
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES = PSARC/2004/187
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2004/685 Xorg server upgrade to X11R6.8 release
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2004/685
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2004/829 Xorg 6.8.2 server upgrade for Solaris
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2004/829
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2005/450 Xorg 6.9 for Solaris
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2005/450
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2006/609 Xserver provider for DTrace
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2006/609
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# PSARC/2007/051 Xorg server upgrade to 7.2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2007/051
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2007/434 Xorg server 1.3
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2007/434
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2007/500 X11 MIT-SHM Extension across zones
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2007/500
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2008/294 Xorg driver selection based on VIS_GETIDENTIFIER
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2008/294
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2009/021 Xorg server 1.5
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2009/021
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2009/292 Xorg server 1.6
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2009/292
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2009/679 Xorg server 1.7
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2009/679
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2010/109 Introduce libXcb in Solaris
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2010/109
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2011/008 Xorg server 1.9
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2011/008
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2010/382 Removal of 32-bit X servers
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2010/382
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2011/214 Xorg server 1.10
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2011/214
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2012/144 Xorg server 1.12
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2012/144
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2012/320 Xorg server 1.13
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2012/320
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2013/091 Xorg server 1.14
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2013/091
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2015/251 Xorg server 1.17
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2015/251
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# PSARC/2015/251 Xorg server 1.18
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ARC_CASES += PSARC/2016/293
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Man pages to apply Sun footer to & attributes to list
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCHED_MANPAGES= \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews man/Xserver.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/dmx/config/man/xdmxconfig.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/dmx/config/man/vdltodmx.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/dmx/config/man/dmxtodmx.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/dmx/man/Xdmx.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/kdrive/ephyr/man/Xephyr.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/exa/man/exa.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/fbdevhw/man/fbdevhw.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/utils/man/cvt.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/utils/man/gtf.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/man/Xorg.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/man/xorg.conf.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/xfree86/man/xorg.conf.d.man \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews hw/vfb/man/Xvfb.man
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_STABILITY=Volatile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Override specific attributes for specific man pages
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_SUNTOUCH_MAN_FLAGS= \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Xephyr, Xvfb, and Xdmx are split out into their own packages
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsSUNTOUCH_MAN_FLAGS_Xephyr = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xephyr)}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_Xvfb = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xvfb)}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_Xdmx = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xdmx)}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_Xserver = -o '{Availability, $(MODULE_PKGNAME:%xorg=%xserver-common)}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_cvt = -o '{Availability, x11/modeline-utilities}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_gtf = -o '{Availability, x11/modeline-utilities}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_xdmxconfig = $(SUNTOUCH_MAN_FLAGS_Xdmx)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_vdltodmx = $(SUNTOUCH_MAN_FLAGS_Xdmx)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSUNTOUCH_MAN_FLAGS_dmxtodmx = $(SUNTOUCH_MAN_FLAGS_Xdmx)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews# Binary built in tree
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXORGSERVER_BIN=$(BUILD_DIR)/hw/xfree86/Xorg
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_TARGETS=$(XORGSERVER_BIN) build_mdb set-elf-comments \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(BUILD_DIR)/mapfile-Xorg-externs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_TARGETS_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Need to regenerate autoconf/automake files after patching
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsAUTORECONF=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Command line options to GNU autoconf configure script
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# XXX: --disable-dga
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --enable-dmx \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --enable-builddocs \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --enable-kdrive --enable-xephyr --disable-xsdl \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --disable-systemd-logind \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews MKFONTDIR="$(MKFONTDIR)" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews MKFONTSCALE="$(MKFONTSCALE)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LDFLAGS = $(XSERVER_LDFLAGS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LD_OPTIONS = $(MAPFILES_FOR_ALL)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Pass linker mapfile listing symbols that modules can count on resolving
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# from the Xorg binary itself
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXORG_EXTERNS_FILE = mapfile-Xorg-externs.$(MACH)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXORG_EXTERNS_FLAG = -Wl,-M,$(PWD)/$(XORG_EXTERNS_FILE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_BUILD_ENV = XORG_EXTERNS_FLAG='$(XORG_EXTERNS_FLAG)'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_LD_SHARED_OPTIONS += -M $(PWD)/$(XORG_EXTERNS_FILE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Disable direct binding in shared objects, since it breaks libglx.so
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_BUILD_ENV += LD_SHARED_UNSET="-B direct"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Optimization doesn't always remove unused inline functions, leaving many
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# binaries referencing pixman symbols that normally don't need them. The
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# $(ZDISCARD_UNUSED_DEP) in LD_OPTIONS should avoid adding it when
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews# not really needed.
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsMODULE_CONFIG_OPTS += LIBS="-lpixman-1"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# pkg-config files that need to have -R added
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsFIX_PC_FILES=xorg-server.pc.in
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Remove compiler specific visibility flag that breaks builds of drivers
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# with other compilers
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_FIX_PC_FLAGS= -e 's|\@symbol_visibility\@||'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Need to use GNU Make to build due to hw/xfree86/loader
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_MAKE=$(GNUMAKE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_MAKE_SET=yes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Additional configure time targets beyond the defaults
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ADD_CONFIGURE_TARGETS=clear_build_date
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Additional install targets beyond the defaults
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews install_fix_paths install_docs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# Have to avoid dependency loop between install_pc_common and
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# install_pkgconfig_uninstalled
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsINSTALL_PCU_DEPS = $(INSTALL_TARGETS:install_pc_common=)
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsINSTALL_PCU_DEPS_SET=yes
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# Merge in additional sources from sun-src directory
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsADDITIONAL_SOURCE_DIR=sun-src
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# Compatibility links from /usr/X11/bin to /usr/bin
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# Only needed for programs that were in /usr/X11/bin before we moved
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsMODULE_X11_BINCOMPAT_LINKS = Xorg Xephyr Xvfb cvt gtf
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsMODULE_X11_BINCOMPAT_LINKS_i386 = amd64
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsMODULE_X11_BINCOMPAT_LINKS += $(MODULE_X11_BINCOMPAT_LINKS_$(MACH))
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews# now just symlinks from amd64 to parent directory
52ece689e0265f9a3e518de5b2539e749f6d35acMark AndrewsLINKED_TO_ISAEXEC = Xorg Xephyr Xvfb Xdmx
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrews
52ece689e0265f9a3e518de5b2539e749f6d35acMark Andrewsinclude ../Makefile.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Don't include build date & time in delivered binaries as it just causes
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# unnecessary binary differences to be pulled into package updates, but
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# leave it in debug builds for developer convenience
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(BUILD_DEBUG:yes=$(POUND_SIGN)) CBD_TARGET = actually_clear_build_date
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclear_build_date: $(CBD_TARGET)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsactually_clear_build_date: $(AUTOCONF_TARGET)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews printf '#undef BUILD_DATE\n#undef BUILD_TIME\n' > \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(BUILD_DIR)/hw/xfree86/common/xf86Build.h
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(XORGSERVER_BIN): default_build
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSDK_INCLUDES_DIR=$(PROTODIR)$(XORG_SDK_INCLUDES_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_extras: default_install
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(SDK_INCLUDES_DIR)/xorg-server.h
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(BUILD_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf $(SOURCE_DIR)/mi/mioverlay.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)$(MODULE_MAN_DIR)/man1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf $(SOURCE_DIR)/hw/xfree86/man/xorgcfg.1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(SOURCE_DIR)/hw/xfree86/man/xorgconfig.1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(MODULE_MAN_DIR)/man1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf $(SOURCE_DIR)/config/x11-input.fdi \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/etc/hal/fdi/preprobe/10osvendor/10-x11-input.fdi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)/etc/X11/xorg.conf.d \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/etc/X11/xorg.conf.avail \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)/usr/share/X11/xorg.conf.d
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf 90-zap.conf $(PROTODIR)/etc/X11/xorg.conf.avail
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# builds, and install xorg-server.pc in 32-bit pkgconfig dir too
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_pc_common: default_install install_pkgconfig_uninstalled
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $(PROTODIR)$(PKGCONFIG_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -pf $(BUILD_DIR)/xorg-server.pc \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater -rm -f $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater mkdir -p $(PROTODIR)$(PKGCONFIG_DIR_32)
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater ln -s ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server.pc \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater ../$(SUBDIR64)$(PKGCONFIG_DIR_suffix)/xorg-server-uninstalled.pc \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $(PROTODIR)$(PKGCONFIG_DIR_32)/
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# Generate a list of exported functions & data objects so that we can verify
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater# loadable modules don't reference symbols that have been deleted or renamed.
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic UpdaterSYMBOL_AWK_SCRIPT = \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater'BEGIN { print "\043 Functions exported by Xorg server to loadable modules" ; \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater print "\n\044mapfile_version 2\n\nSYMBOL_SCOPE {\n\tglobal:" } \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater END { print "};" } \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $$7 ~ /UNDEF|\.tdata/ { next } \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $$5 !~ /GLOB/ { next } \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $$8 ~ /^(__|_edata|_end|_etext|_start|_environ|_lib_version)/ { next } \
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater $$4 ~ /FUNC/ && $$7 ~ /\.text/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8 } \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $$4 ~ /OBJT/ && $$7 ~ /data|bss/ { printf "\t\t%-40s { FLAGS = EXTERN };\n", $$8}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews LC_ALL=C /usr/bin/nm -gs $(XORGSERVER_BIN) | \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews gawk -F\| $(SYMBOL_AWK_SCRIPT) > $@
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews# cmp $(XORG_EXTERNS_FILE) $@
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews# Fix paths in proto area to match paths in packages / installed systems
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsinstall_fix_paths_X: default_install
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews rm -f $(PROTODIR)$(MODULE_BIN_DIR)/X \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(MODULE_BIN_DIR)/$(ARCHBINSUBDIR)/X
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ln -s Xserver $(PROTODIR)$(MODULE_BIN_DIR)/X
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_fix_paths: install_fix_paths_X
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMESA_MODULE_DIR = /usr/lib/mesa/modules/extensions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXT_MODULE_DIR = $(X11_SERVERMODS_DIR)/extensions
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsinstall_fix_paths_glxmodule: default_install
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews @rm -f $(PROTODIR)$(MESA_MODULE_DIR)/libglx.so
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews mkdir -p $(PROTODIR)$(MESA_MODULE_DIR)/
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews mv -f $(PROTODIR)$(EXT_MODULE_DIR)/libglx.so \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(PROTODIR)$(MESA_MODULE_DIR)/libglx.so
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews ln -s ../../../../../system/volatile/opengl/server/libglx.so \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(PROTODIR)$(EXT_MODULE_DIR)/libglx.so
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrewsinstall_fix_paths: install_fix_paths_glxmodule
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews# Install metadata for Xephyr, Xvfb, & Xdmx packages too
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXCOMMON_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xserver-common)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsXEPHYR_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xephyr)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXVFB_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xvfb)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXDMX_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-xorg=%-xdmx)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsMODES_PKG_METADATA_DIR = $(MODULE_PKG_METADATA_DIR:%-server-xorg=%-modeline-utilities)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark AndrewsEXTRA_METADATA_DIRS = $(XCOMMON_PKG_METADATA_DIR) \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(XEPHYR_PKG_METADATA_DIR) \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(XVFB_PKG_METADATA_DIR) \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(XDMX_PKG_METADATA_DIR) \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(MODES_PKG_METADATA_DIR)
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXTRA_ATTRDATA_FILES = $(EXTRA_METADATA_DIRS:%=%/$(ATTRDATA_FILE_NAME))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXTRA_LICENSE_FILES = $(EXTRA_METADATA_DIRS:%=%/$(LICENSE_FILE_NAME))
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEXTRA_METADATA_TARGETS= $(EXTRA_METADATA_DIRS) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EXTRA_ATTRDATA_FILES) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(EXTRA_LICENSE_FILES)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_metadata: $(EXTRA_METADATA_TARGETS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
731cc132f22dbc9e0ecd7035dce314a61076d31bAutomatic Updater$(EXTRA_ATTRDATA_FILES) $(EXTRA_LICENSE_FILES): $(EXTRA_METADATA_DIRS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(EXTRA_METADATA_DIRS):
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Special compatibility links from /usr/X11/include to /usr/include
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsX11_INCLUDE_COMPAT_DIR = $(PROTODIR)/usr/X11/include
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsX11_INCLUDE_COMPAT_LINKS = $(X11_INCLUDE_COMPAT_DIR)/drm \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(X11_INCLUDE_COMPAT_DIR)/xorg
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: $(X11_INCLUDE_COMPAT_LINKS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(X11_INCLUDE_COMPAT_DIR):
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews mkdir -p $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(X11_INCLUDE_COMPAT_LINKS): $(X11_INCLUDE_COMPAT_DIR)
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews @rm -f $@
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews ln -s ../../include/$(@F) $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews## mdb module rules
4abdfc917e6635a7c81d1f931a0c79227e72d025Mark Andrews# Build & install mdb modules & scripts that aren't integrated to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# normal build process.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMDB_SOURCE_DIR = $(XORG_SOURCE_DIR)/os/solaris/mdb
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMDB_BUILD_DIR = $(XORG_BUILD_DIR)/os/solaris/mdb
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMDB_REL_SOURCE_DIR = ../../../../$(MDB_SOURCE_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMDB_MODULE_DIR=/usr/lib/mdb/proc/$(ARCHLIBSUBDIR)
MDB_SCRIPT_DIR=/usr/demo/Xserver/mdb
MDB_SCRIPTS=list_Xserver_clients \
list_Xserver_devicegrab_client \
list_Xserver_servergrab_client
MDB_MODULE_NAMES=Xephyr Xorg Xvfb Xvnc Xdmx
BUILT_MDB_MODULE=$(MDB_BUILD_DIR)/modules/Xserver.so
BUILT_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(MDB_BUILD_DIR)/scripts/%)
INSTALLED_MDB_LINKS=$(MDB_MODULE_NAMES:%=$(PROTODIR)$(MDB_MODULE_DIR)/%.so)
INSTALLED_MDB_MODULE=$(PROTODIR)$(MDB_MODULE_DIR)/Xserver.so
INSTALLED_MDB_SCRIPTS=$(MDB_SCRIPTS:%=$(PROTODIR)$(MDB_SCRIPT_DIR)/%)
INSTALLED_MDB_ALL=$(INSTALLED_MDB_MODULE) $(INSTALLED_MDB_LINKS) \
$(INSTALLED_MDB_SCRIPTS)
# Since configure options aren't used to build the mdb modules, pass
# those variables at build time
MDB_BUILD_ENV=$(CONFIG_ENV) $(BUILD_ENV)
MDB_BUILD_ENV += CFLAGS="$(LIB_CFLAGS)" LDFLAGS="$(LIB_LDFLAGS)"
MDB_BUILD_ENV += ARCHLIBSUBDIR="$(ARCHLIBSUBDIR)"
MDB_BUILD_ENV += top_builddir="$(PWD)/$(BUILD_DIR)"
MDB_BUILD_ENV += top_srcdir="$(PWD)/$(SOURCE_DIR)"
build_mdb: $(BUILT_MDB_MODULE)
$(BUILT_MDB_SCRIPTS): $(SOURCE_TARGETS)
$(MDB_BUILD_DIR): $(SOURCE_TARGETS) $(BUILD_DIR) $(LNDIR)
mkdir -p $(MDB_BUILD_DIR)
cd $(MDB_BUILD_DIR) && $(LNDIR) $(MDB_REL_SOURCE_DIR)
$(BUILT_MDB_MODULE): $(CONFIGURE_TARGETS) $(MDB_BUILD_DIR)
(cd $(MDB_BUILD_DIR) && \
$(MDB_BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
$(PROTODIR)$(MDB_MODULE_DIR) $(PROTODIR)$(MDB_SCRIPT_DIR):
mkdir -p $@
$(INSTALLED_MDB_MODULE): $(PROTODIR)$(MDB_MODULE_DIR) $(BUILT_MDB_MODULE)
$(INSTALL_SCRIPT) -c -m 0555 $(BUILT_MDB_MODULE) $@
$(INSTALLED_MDB_LINKS): $(PROTODIR)$(MDB_MODULE_DIR)
@rm -f $@
ln -s Xserver.so $@
$(INSTALLED_MDB_SCRIPTS): $(BUILT_MDB_SCRIPTS) $(PROTODIR)$(MDB_SCRIPT_DIR)
$(INSTALL_SCRIPT) -c -m 0555 $(MDB_SOURCE_DIR)/scripts/$(@F) \
$(PROTODIR)$(MDB_SCRIPT_DIR)/
install_mdb: $(INSTALLED_MDB_ALL)
$(INSTALL_SCRIPT) -c -m 0444 $(MDB_SOURCE_DIR)/README \
$(PROTODIR)$(MDB_SCRIPT_DIR)/
## Backwards compatibility for old doc path
INSTALLED_DOC_LINK = $(PROTODIR)$(MODULE_DOC_DIR:$(MODULE_NAME)=Xserver)
## IPS package release notes shown when upgrading
$(PROTODIR)$(RELNOTES_DIR):
mkdir -p $@
install_docs: $(PROTODIR)$(RELNOTES_DIR) $(INSTALLED_DOC_LINK)
$(INSTALL_SCRIPT) -c -m 0444 release-notes/*.txt \
$(PROTODIR)$(RELNOTES_DIR)
$(INSTALLED_DOC_LINK): $(PROTODIR)$(MODULE_DOC_DIR)
@rm -f $@
ln -s $(MODULE_NAME) $@