Makefile revision 536
824N/A###############################################################################
824N/A#
824N/A# Xorg server Makefile
824N/A#
824N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
824N/A# Use subject to license terms.
824N/A#
824N/A# Permission is hereby granted, free of charge, to any person obtaining a
824N/A# copy of this software and associated documentation files (the
824N/A# "Software"), to deal in the Software without restriction, including
824N/A# without limitation the rights to use, copy, modify, merge, publish,
824N/A# distribute, and/or sell copies of the Software, and to permit persons
824N/A# to whom the Software is furnished to do so, provided that the above
824N/A# copyright notice(s) and this permission notice appear in all copies of
824N/A# the Software and that both the above copyright notice(s) and this
824N/A# permission notice appear in supporting documentation.
824N/A#
824N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
824N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
824N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
824N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
824N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
824N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
824N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
824N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
824N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
824N/A#
824N/A# Except as contained in this notice, the name of a copyright holder
824N/A# shall not be used in advertising or otherwise to promote the sale, use
824N/A# or other dealings in this Software without prior written authorization
824N/A# of the copyright holder.
824N/A#
824N/A# @(#)Makefile 1.65 08/09/05
824N/A#
824N/A
824N/A# Build 32-bit or 64-bit?
824N/ABUILD_TYPES_SET=yes
824N/ABUILD_TYPES_sparc=64
824N/ABUILD_TYPES_i386=32 64
824N/ABUILD_TYPES=$(BUILD_TYPES_$(MACH))
824N/A
824N/A# Package name used in tarballs
824N/AMODULE_NAME=xorg-server
824N/A
824N/A# Version number (used in path names)
824N/AMODULE_VERSION=$(XORGSERVER_VERS)
824N/A
824N/A# Patches to apply to source after unpacking, in order
824N/A# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
824N/ASOURCE_PATCHES=$(XORG_SOURCE_PATCHES)
824N/A
824N/A# Man pages to apply Sun footer to & attributes to list
824N/A# XXX: Need to adjust some of these to correct packages/stability
824N/ASUNTOUCHED_MANPAGES= \
824N/A hw/xfree86/utils/gtf/gtf.man.pre \
824N/A hw/xfree86/utils/cvt/cvt.man.pre \
824N/A hw/xfree86/utils/pcitweak/pcitweak.man.pre \
824N/A hw/xfree86/utils/scanpci/scanpci.man.pre \
824N/A hw/xfree86/utils/xorgcfg/xorgcfg.man.pre \
824N/A hw/xfree86/utils/xorgconfig/xorgconfig.man.pre \
824N/A hw/xfree86/doc/man/Xorg.man.pre \
824N/A hw/xfree86/doc/man/xorg.conf.man.pre
824N/A
824N/ASUN_PACKAGE=SUNWxorg-server
824N/AMODULE_STABILITY=Volatile
824N/AMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
824N/A
824N/A# Compiler to use - x86 MMX code only builds with gcc, not Sun Studio, so use
824N/A# gcc on x86 for now, but keep Sun Studio on SPARC
824N/AMODULE_COMPILER_sparc=suncc
824N/AMODULE_COMPILER_i386=gcc
824N/AMODULE_COMPILER=$(MODULE_COMPILER_$(MACH))
824N/AMODULE_COMPILER_SET=yes
824N/A
824N/A# Binary built in tree
824N/AXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
824N/A
824N/ABUILD_TARGETS=fix-xf1bpp $(XORGSERVER_BIN) $(BUILD_DIR)/mapfile-Xorg-externs
824N/ABUILD_TARGETS_SET=yes
824N/A
824N/A# Need to regenerate autoconf/automake files after patching
824N/AAUTORECONF=yes
824N/A
824N/A# Command line options to GNU autoconf configure script
824N/A# Need to override LD setting to add -xarch flags that libtool strips
824N/A# XXX: --disable-dga
824N/AMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
824N/A --enable-builddocs --enable-xorgcfg \
824N/A --enable-kdrive --enable-xephyr --disable-xsdl \
824N/A LD="$(CC) $(ARCH_FLAGS)"
824N/A
824N/A# Need specific ordering of CPPFLAGS for Mesa headers for now
USE_DEFAULT_CONFIG_CPPFLAGS=no
MODULE_CPPFLAGS= \
-I$(PROTODIR)$(X11_INCLUDES_DIR)/drm \
-I$(PROTODIR)$(X11_INCLUDES_DIR)/X11/dri
include ../Makefile.inc
# Merge in additional sources from sun-src directory
source_gen:: $(LNDIR)
-$(RM) -f $(SOURCE_DIR)/hw/xfree86/scanpci/pci.ids \
$(SOURCE_DIR)/hw/xfree86/scanpci/xf86PciIds.h
(mkdir -p $(SOURCE_DIR)/GL/mesa/vbo)
(cp ./sun-src/mesa/Makefile.am $(SOURCE_DIR)/GL/mesa/vbo)
(cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
# Force broken xf1bpp sources in 1.3 to be regenerated
fix-xf1bpp: $(SOURCE_DIR)/Makefile
(cd $(SOURCE_DIR)/hw/xfree86/xf1bpp && \
$(MAKE) $(MAKEFLAGS) maintainer-clean-generic)
$(XORGSERVER_BIN): default_build
EXTRA_INSTALL_sparc=install_pc
EXTRA_INSTALL_i386=
EXTRA_INSTALL=$(EXTRA_INSTALL_$(MACH))
install_gen:: default_install $(EXTRA_INSTALL)
sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
-e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
#ifdef _LP64\
#define _XSERVER64 1\
#endif%' \
$(SOURCE_DIR)/include/xorg-server.h > $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xorg-server.h
cp -p $(SOURCE_DIR)/mi/mioverlay.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/mioverlay.h
cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xf86Sbus.h
mkdir -p $(PROTODIR)$(X11_DOC_DIR)
cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
install_pc:
cp -p $(SOURCE_DIR)/xorg-server.pc $(PROTODIR)/usr/lib/pkgconfig/
$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
-rm -f $@
printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
printf '{\n global:\n' >> $@
/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' >> $@
printf '};\n' >> $@