Makefile revision 659
98N/A###############################################################################
98N/A#
98N/A# Xorg server Makefile
98N/A#
606N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
98N/A# Use subject to license terms.
98N/A#
98N/A# Permission is hereby granted, free of charge, to any person obtaining a
98N/A# copy of this software and associated documentation files (the
98N/A# "Software"), to deal in the Software without restriction, including
98N/A# without limitation the rights to use, copy, modify, merge, publish,
98N/A# distribute, and/or sell copies of the Software, and to permit persons
98N/A# to whom the Software is furnished to do so, provided that the above
98N/A# copyright notice(s) and this permission notice appear in all copies of
98N/A# the Software and that both the above copyright notice(s) and this
98N/A# permission notice appear in supporting documentation.
98N/A#
98N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
98N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
98N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
98N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
98N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
98N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
98N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
98N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
98N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
98N/A#
98N/A# Except as contained in this notice, the name of a copyright holder
98N/A# shall not be used in advertising or otherwise to promote the sale, use
98N/A# or other dealings in this Software without prior written authorization
98N/A# of the copyright holder.
98N/A#
622N/A# @(#)Makefile 1.74 09/01/30
98N/A#
98N/A
235N/A# Build 32-bit or 64-bit?
156N/ABUILD_TYPES_SET=yes
156N/ABUILD_TYPES_sparc=64
156N/ABUILD_TYPES_i386=32 64
156N/ABUILD_TYPES=$(BUILD_TYPES_$(MACH))
98N/A
98N/A# Package name used in tarballs
98N/AMODULE_NAME=xorg-server
98N/A
493N/A# Version number (used in path names)
493N/AMODULE_VERSION=$(XORGSERVER_VERS)
98N/A
98N/A# Patches to apply to source after unpacking, in order
235N/A# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
493N/ASOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
98N/A
98N/A# Man pages to apply Sun footer to & attributes to list
98N/A# XXX: Need to adjust some of these to correct packages/stability
98N/ASUNTOUCHED_MANPAGES= \
606N/A hw/kdrive/ephyr/Xephyr.man.pre \
98N/A hw/xfree86/utils/gtf/gtf.man.pre \
98N/A hw/xfree86/utils/cvt/cvt.man.pre \
98N/A hw/xfree86/utils/xorgcfg/xorgcfg.man.pre \
98N/A hw/xfree86/utils/xorgconfig/xorgconfig.man.pre \
98N/A hw/xfree86/doc/man/Xorg.man.pre \
606N/A hw/xfree86/doc/man/xorg.conf.man.pre \
606N/A hw/vfb/Xvfb.man.pre
98N/A
493N/ASUN_PACKAGE=SUNWxorg-server
493N/AMODULE_STABILITY=Volatile
493N/AMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
98N/A
235N/A# Compiler to use - x86 MMX code only builds with gcc, not Sun Studio, so use
235N/A# gcc on x86 for now, but keep Sun Studio on SPARC
493N/AMODULE_COMPILER_sparc=suncc
493N/AMODULE_COMPILER_i386=gcc
493N/AMODULE_COMPILER=$(MODULE_COMPILER_$(MACH))
493N/AMODULE_COMPILER_SET=yes
235N/A
98N/A# Binary built in tree
98N/AXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
98N/A
606N/ABUILD_TARGETS=$(XORGSERVER_BIN) set-elf-comments \
591N/A $(BUILD_DIR)/mapfile-Xorg-externs
493N/ABUILD_TARGETS_SET=yes
493N/A
587N/A# Additional license files to install
587N/AEXTRA_LICENSES = \
606N/A COPYING.Xprint-fonts
587N/A
493N/A# Need to regenerate autoconf/automake files after patching
493N/AAUTORECONF=yes
493N/A
493N/A# Command line options to GNU autoconf configure script
493N/A# Need to override LD setting to add -xarch flags that libtool strips
493N/A# XXX: --disable-dga
493N/AMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
622N/A --enable-builddocs --enable-xorgcfg --disable-xprint \
493N/A --enable-kdrive --enable-xephyr --disable-xsdl \
557N/A MKFONTDIR="$(MKFONTDIR)" \
557N/A MKFONTSCALE="$(MKFONTSCALE)" \
493N/A LD="$(CC) $(ARCH_FLAGS)"
493N/A
606N/A# pkg-config files that need to have -R added
606N/AFIX_PC_FILES=xorg-server.pc.in
98N/A
591N/A# Additional install targets beyond the defaults
591N/AEXTRA_INSTALL_sparc=install_pc
591N/AEXTRA_INSTALL_i386=
591N/AMODULE_ADD_INSTALL_TARGETS=install_extras $(EXTRA_INSTALL_$(MACH))
591N/A
235N/Ainclude ../Makefile.inc
98N/A
98N/A# Merge in additional sources from sun-src directory
98N/Asource_gen:: $(LNDIR)
98N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
98N/A
606N/A$(XORGSERVER_BIN): default_build
98N/A
606N/ASDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
98N/A
591N/Ainstall_extras: default_install
111N/A sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
111N/A -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
111N/A#ifdef _LP64\
111N/A#define _XSERVER64 1\
111N/A#endif%' \
606N/A $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
606N/A cp -p $(SOURCE_DIR)/mi/mioverlay.h $(SDK_INCLUDES_DIR)/mioverlay.h
606N/A cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(SDK_INCLUDES_DIR)/xf86Sbus.h
606N/A cp -p $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
606N/A -rm -f $(SDK_INCLUDES_DIR)/xf1bpp.h $(SDK_INCLUDES_DIR)/xf4bpp.h
98N/A mkdir -p $(PROTODIR)$(X11_DOC_DIR)
98N/A cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
606N/A mkdir -p $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor
606N/A cp -p $(SOURCE_DIR)/config/x11-input.fdi \
606N/A $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor/10-x11-input.fdi
622N/A (cd $(SOURCE_DIR)/hw/xprint/doc && \
622N/A $(BUILD_ENV) $(MODULE_MAKE) $(MAKEFLAGS) \
622N/A $(DEFAULT_INSTALL_MAKEFLAGS) install)
98N/A
212N/A# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
606N/Ainstall_pc: install_pkgconfig_uninstalled
606N/A cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server.pc \
606N/A $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc
606N/A cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server-uninstalled.pc \
606N/A $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
212N/A
98N/A$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
98N/A -rm -f $@
98N/A printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
98N/A printf '{\n global:\n' >> $@
182N/A /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' >> $@
98N/A printf '};\n' >> $@