Makefile revision 480
0N/A###############################################################################
0N/A#
0N/A# Xorg server Makefile
0N/A#
314N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
0N/A# Use subject to license terms.
0N/A#
0N/A# Permission is hereby granted, free of charge, to any person obtaining a
0N/A# copy of this software and associated documentation files (the
0N/A# "Software"), to deal in the Software without restriction, including
0N/A# without limitation the rights to use, copy, modify, merge, publish,
0N/A# distribute, and/or sell copies of the Software, and to permit persons
0N/A# to whom the Software is furnished to do so, provided that the above
0N/A# copyright notice(s) and this permission notice appear in all copies of
0N/A# the Software and that both the above copyright notice(s) and this
0N/A# permission notice appear in supporting documentation.
0N/A#
0N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
0N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
0N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
0N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
0N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
0N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
0N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0N/A#
0N/A# Except as contained in this notice, the name of a copyright holder
0N/A# shall not be used in advertising or otherwise to promote the sale, use
0N/A# or other dealings in this Software without prior written authorization
0N/A# of the copyright holder.
0N/A#
314N/A# @(#)Makefile 1.63 08/03/07
0N/A#
0N/A
156N/A# Build 32-bit or 64-bit?
156N/ABUILD_TYPES_SET=yes
0N/ABUILD_TYPES_sparc=64
0N/ABUILD_TYPES_i386=32 64
156N/ABUILD_TYPES=$(BUILD_TYPES_$(MACH))
0N/A
0N/A# Package name used in tarballs
156N/AMODULE_NAME=xorg-server
156N/A
156N/A# Name used in server-specific rules in ../Makefile.inc
0N/AXSERVER=XORG
0N/A
156N/A# Source tarball
156N/ASOURCE_TARBALL_NAME=$(MODULE_NAME)-$(XORGSERVER_VERS).tar.bz2
0N/ASOURCE_TARBALL_DIR=xserver
0N/A
156N/A# Patches to apply to source after unpacking, in order
156N/A# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
0N/ASOURCE_PATCHES:sh=cat -s patch-list closed-src/patch-list | sed '/^\#/ d'
156N/A
156N/A# Directory created by unpacking source
0N/ASOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(XORGSERVER_VERS)
0N/A
0N/A# Man pages to apply Sun footer to & attributes to list
0N/A# XXX: Need to adjust some of these to correct packages/stability
156N/ASUNTOUCHED_MANPAGES= \
156N/A hw/xfree86/utils/gtf/gtf.man.pre \
156N/A hw/xfree86/utils/cvt/cvt.man.pre \
156N/A hw/xfree86/utils/pcitweak/pcitweak.man.pre \
156N/A hw/xfree86/utils/scanpci/scanpci.man.pre \
156N/A hw/xfree86/utils/xorgcfg/xorgcfg.man.pre \
156N/A hw/xfree86/utils/xorgconfig/xorgconfig.man.pre \
0N/A hw/xfree86/doc/man/Xorg.man.pre \
255N/A hw/xfree86/doc/man/xorg.conf.man.pre
156N/A
156N/ASUNTOUCH_MAN_FLAGS= -p $(XSERVER_PREFIX)/bin/ \
156N/A -a '{Availability, SUNWxorg-server} {Interface Stability, Volatile}'
156N/A
0N/A# Compiler to use - x86 MMX code only builds with gcc, not Sun Studio, so use
0N/A# gcc on x86 for now, but keep Sun Studio on SPARC
156N/ACOMPILER_sparc=cc
0N/ACOMPILER_i386=gcc
0N/ACOMPILER=$(COMPILER_$(MACH))
0N/A
0N/A# Binary built in tree
0N/AXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
0N/A
0N/ABUILD_TARGETS=$(XORGSERVER_BIN) $(BUILD_DIR)/mapfile-Xorg-externs
0N/A
255N/Ainclude ../Makefile.inc
156N/A
156N/A# Merge in additional sources from sun-src directory
0N/Asource_gen:: $(LNDIR)
0N/A -$(RM) -f $(SOURCE_DIR)/hw/xfree86/scanpci/pci.ids \
0N/A $(SOURCE_DIR)/hw/xfree86/scanpci/xf86PciIds.h
0N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
0N/A
255N/A# Command line options to GNU autoconf configure script
0N/A# XXX: --disable-dga
255N/ACONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
0N/A --enable-builddocs --enable-xorgcfg \
0N/A --enable-kdrive --enable-xephyr --disable-xsdl
0N/A
156N/AXORG_CPPFLAGS= $(XSERVER_CPPFLAGS) \
0N/A -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm \
175N/A -I$(PROTODIR)$(X11_INCLUDES_DIR)/X11/dri
175N/A
175N/A# Run configure script
175N/A$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) $(SOURCE_DIR)/configure
0N/A (cd $(SOURCE_DIR) && \
0N/A $(CONFIG_ENV) ./configure $(CONFIG_OPTS) )
0N/A (cd $(SOURCE_DIR)/hw/xfree86/xf1bpp && \
156N/A $(MAKE) $(MFLAGS) maintainer-clean-generic)
0N/A
156N/A$(SOURCE_DIR)/configure: $(UNPACK_TARGET) $(SOURCE_DIR)/configure.ac
0N/A $(MAKE) $(MFLAGS) autoreconf
0N/A
0N/A$(XORGSERVER_BIN): $(SOURCE_DIR)/Makefile
0N/A (cd $(SOURCE_DIR) ; $(BUILD_ENV) $(MAKE) $(MFLAGS))
0N/A
0N/AEXTRA_INSTALL_sparc=install_pc
0N/AEXTRA_INSTALL_i386=
0N/AEXTRA_INSTALL=$(EXTRA_INSTALL_$(MACH))
0N/A
0N/Ainstall_gen:: $(XORGSERVER_BIN) $(EXTRA_INSTALL)
0N/A (cd $(SOURCE_DIR) ; $(BUILD_ENV) $(MAKE) $(MFLAGS) -e install \
0N/A DESTDIR=$(PROTODIR) CPPROG="cp -p" \
0N/A pkgconfigdir=/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig )
0N/A sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
0N/A -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
0N/A#ifdef _LP64\
0N/A#define _XSERVER64 1\
0N/A#endif%' \
0N/A $(SOURCE_DIR)/include/xorg-server.h > $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xorg-server.h
0N/A cp -p $(SOURCE_DIR)/mi/mioverlay.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/mioverlay.h
0N/A cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xf86Sbus.h
0N/A mkdir -p $(PROTODIR)$(X11_DOC_DIR)
0N/A cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
172N/A
172N/A# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
172N/Ainstall_pc:
156N/A cp -p $(SOURCE_DIR)/xorg-server.pc $(PROTODIR)/usr/lib/pkgconfig/
156N/A
156N/A$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
156N/A -rm -f $@
156N/A printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
156N/A printf '{\n global:\n' >> $@
156N/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' >> $@
0N/A printf '};\n' >> $@
156N/A