Makefile revision 705
842ae4bd224140319ae7feec1872b93dfd491143fielding###############################################################################
842ae4bd224140319ae7feec1872b93dfd491143fielding#
842ae4bd224140319ae7feec1872b93dfd491143fielding# Xorg server Makefile
842ae4bd224140319ae7feec1872b93dfd491143fielding#
842ae4bd224140319ae7feec1872b93dfd491143fielding# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
842ae4bd224140319ae7feec1872b93dfd491143fielding# Use subject to license terms.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Permission is hereby granted, free of charge, to any person obtaining a
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# copy of this software and associated documentation files (the
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# "Software"), to deal in the Software without restriction, including
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# without limitation the rights to use, copy, modify, merge, publish,
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# distribute, and/or sell copies of the Software, and to permit persons
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# to whom the Software is furnished to do so, provided that the above
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# copyright notice(s) and this permission notice appear in all copies of
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# the Software and that both the above copyright notice(s) and this
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# permission notice appear in supporting documentation.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
e8f95a682820a599fe41b22977010636be5c2717jim# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
e8f95a682820a599fe41b22977010636be5c2717jim# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1747d30b98aa1bdbc43994c02cd46ab4cb9319e4fielding# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
5c0419d51818eb02045cf923a9fe456127a44c60wrowe# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#
5c0419d51818eb02045cf923a9fe456127a44c60wrowe# Except as contained in this notice, the name of a copyright holder
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# shall not be used in advertising or otherwise to promote the sale, use
ab86c68ce36c715e93f403dde41d0b9c1522c8b0sf# or other dealings in this Software without prior written authorization
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# of the copyright holder.
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# @(#)Makefile 1.76 09/05/15
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
1ceeea823d893a985971a745ac9e29f4e70bf6aajorton# Build 32-bit or 64-bit?
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesBUILD_TYPES_SET=yes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesBUILD_TYPES_sparc=64
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesBUILD_TYPES_i386=32 64
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesBUILD_TYPES=$(BUILD_TYPES_$(MACH))
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
1ceeea823d893a985971a745ac9e29f4e70bf6aajorton# Package name used in tarballs
1ceeea823d893a985971a745ac9e29f4e70bf6aajortonMODULE_NAME=xorg-server
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
1ceeea823d893a985971a745ac9e29f4e70bf6aajorton# Version number (used in path names)
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesMODULE_VERSION=$(XORGSERVER_VERS)
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Patches to apply to source after unpacking, in order
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
1ceeea823d893a985971a745ac9e29f4e70bf6aajortonSOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
1ceeea823d893a985971a745ac9e29f4e70bf6aajorton
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Man pages to apply Sun footer to & attributes to list
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# XXX: Need to adjust some of these to correct packages/stability
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesSUNTOUCHED_MANPAGES= \
49f201ab000a4b238ae84f17a6fba6cbb38c024ejailletc hw/kdrive/ephyr/Xephyr.man.pre \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes hw/xfree86/utils/gtf/gtf.man.pre \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes hw/xfree86/utils/cvt/cvt.man.pre \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes hw/xfree86/doc/man/Xorg.man.pre \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes hw/xfree86/doc/man/xorg.conf.man.pre \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes hw/vfb/Xvfb.man.pre
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesSUN_PACKAGE=SUNWxorg-server
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesMODULE_STABILITY=Volatile
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Binary built in tree
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesBUILD_TARGETS=$(XORGSERVER_BIN) set-elf-comments \
1ceeea823d893a985971a745ac9e29f4e70bf6aajorton $(BUILD_DIR)/mapfile-Xorg-externs
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesBUILD_TARGETS_SET=yes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Need to regenerate autoconf/automake files after patching
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesAUTORECONF=yes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Command line options to GNU autoconf configure script
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Need to override LD setting to add -xarch flags that libtool strips
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# XXX: --disable-dga
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes --enable-builddocs \
1ceeea823d893a985971a745ac9e29f4e70bf6aajorton --enable-kdrive --enable-xephyr --disable-xsdl \
aca6568a9f251eedf4b3418eb4b3be05d3c366edtrawick MKFONTDIR="$(MKFONTDIR)" \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes MKFONTSCALE="$(MKFONTSCALE)" \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes LD="$(CC) $(ARCH_FLAGS)"
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# pkg-config files that need to have -R added
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesFIX_PC_FILES=xorg-server.pc.in
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Additional install targets beyond the defaults
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesEXTRA_INSTALL_sparc=install_pc
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesEXTRA_INSTALL_i386=
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesMODULE_ADD_INSTALL_TARGETS=install_extras $(EXTRA_INSTALL_$(MACH))
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesinclude ../Makefile.inc
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes# Merge in additional sources from sun-src directory
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholessource_gen:: $(LNDIR)
3a11074e78d5961088e8f5520ba3cec163faed9cjorton (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes$(XORGSERVER_BIN): default_build
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesSDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
e8f95a682820a599fe41b22977010636be5c2717jim
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholesinstall_extras: default_install
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
e8f95a682820a599fe41b22977010636be5c2717jim#ifdef _LP64\
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#define _XSERVER64 1\
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes#endif%' \
e8f95a682820a599fe41b22977010636be5c2717jim $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
827589d5cf1750c93695055f302ef017175f1458jorton cp -p $(SOURCE_DIR)/mi/mioverlay.h $(SDK_INCLUDES_DIR)/mioverlay.h
827589d5cf1750c93695055f302ef017175f1458jorton cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(SDK_INCLUDES_DIR)/xf86Sbus.h
827589d5cf1750c93695055f302ef017175f1458jorton cp -p $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
827589d5cf1750c93695055f302ef017175f1458jorton -rm -f $(SDK_INCLUDES_DIR)/xf1bpp.h $(SDK_INCLUDES_DIR)/xf4bpp.h
827589d5cf1750c93695055f302ef017175f1458jorton mkdir -p $(PROTODIR)$(X11_DOC_DIR)
827589d5cf1750c93695055f302ef017175f1458jorton cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
827589d5cf1750c93695055f302ef017175f1458jorton mkdir -p $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor
827589d5cf1750c93695055f302ef017175f1458jorton cp -p $(SOURCE_DIR)/config/x11-input.fdi \
827589d5cf1750c93695055f302ef017175f1458jorton $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor/10-x11-input.fdi
827589d5cf1750c93695055f302ef017175f1458jorton
827589d5cf1750c93695055f302ef017175f1458jorton# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
827589d5cf1750c93695055f302ef017175f1458jortoninstall_pc: install_pkgconfig_uninstalled
827589d5cf1750c93695055f302ef017175f1458jorton cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server.pc \
827589d5cf1750c93695055f302ef017175f1458jorton $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc
827589d5cf1750c93695055f302ef017175f1458jorton cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server-uninstalled.pc \
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes -rm -f $@
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes printf '{\n global:\n' >> $@
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes /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' >> $@
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes printf '};\n' >> $@
d5b12fe8ae917e654a33247fd4e59dc9e75170aebnicholes