Makefile revision 527
98N/A###############################################################################
98N/A#
98N/A# Xorg server Makefile
98N/A#
493N/A# Copyright 2008 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#
527N/A# @(#)Makefile 1.65 08/09/05
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= \
98N/A hw/xfree86/utils/gtf/gtf.man.pre \
98N/A hw/xfree86/utils/cvt/cvt.man.pre \
98N/A hw/xfree86/utils/pcitweak/pcitweak.man.pre \
98N/A hw/xfree86/utils/scanpci/scanpci.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 \
98N/A hw/xfree86/doc/man/xorg.conf.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
493N/ABUILD_TARGETS=fix-xf1bpp $(XORGSERVER_BIN) $(BUILD_DIR)/mapfile-Xorg-externs
493N/ABUILD_TARGETS_SET=yes
493N/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) \
493N/A --enable-builddocs --enable-xorgcfg \
493N/A --enable-kdrive --enable-xephyr --disable-xsdl \
493N/A LD="$(CC) $(ARCH_FLAGS)"
493N/A
493N/A# Need specific ordering of CPPFLAGS for Mesa headers for now
493N/AUSE_DEFAULT_CONFIG_CPPFLAGS=no
493N/AMODULE_CPPFLAGS= \
493N/A -I$(PROTODIR)$(X11_INCLUDES_DIR)/drm \
493N/A -I$(PROTODIR)$(X11_INCLUDES_DIR)/X11/dri
98N/A
235N/Ainclude ../Makefile.inc
98N/A
98N/A# Merge in additional sources from sun-src directory
98N/Asource_gen:: $(LNDIR)
343N/A -$(RM) -f $(SOURCE_DIR)/hw/xfree86/scanpci/pci.ids \
343N/A $(SOURCE_DIR)/hw/xfree86/scanpci/xf86PciIds.h
527N/A (mkdir -p $(SOURCE_DIR)/GL/mesa/vbo)
527N/A (cp ./sun-src/mesa/Makefile.am $(SOURCE_DIR)/GL/mesa/vbo)
98N/A (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
98N/A
493N/A# Force broken xf1bpp sources in 1.3 to be regenerated
493N/Afix-xf1bpp: $(SOURCE_DIR)/Makefile
493N/A (cd $(SOURCE_DIR)/hw/xfree86/xf1bpp && \
493N/A $(MAKE) $(MAKEFLAGS) maintainer-clean-generic)
98N/A
493N/A$(XORGSERVER_BIN): default_build
98N/A
212N/AEXTRA_INSTALL_sparc=install_pc
212N/AEXTRA_INSTALL_i386=
212N/AEXTRA_INSTALL=$(EXTRA_INSTALL_$(MACH))
212N/A
493N/Ainstall_gen:: default_install $(EXTRA_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%' \
111N/A $(SOURCE_DIR)/include/xorg-server.h > $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xorg-server.h
493N/A cp -p $(SOURCE_DIR)/mi/mioverlay.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/mioverlay.h
493N/A cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xf86Sbus.h
98N/A mkdir -p $(PROTODIR)$(X11_DOC_DIR)
98N/A cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
98N/A
212N/A# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
212N/Ainstall_pc:
212N/A cp -p $(SOURCE_DIR)/xorg-server.pc $(PROTODIR)/usr/lib/pkgconfig/
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' >> $@