Makefile revision 356
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff###############################################################################
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Xorg server Makefile
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Use subject to license terms.
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Permission is hereby granted, free of charge, to any person obtaining a
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# copy of this software and associated documentation files (the
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# "Software"), to deal in the Software without restriction, including
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# without limitation the rights to use, copy, modify, merge, publish,
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# distribute, and/or sell copies of the Software, and to permit persons
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# to whom the Software is furnished to do so, provided that the above
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# copyright notice(s) and this permission notice appear in all copies of
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# the Software and that both the above copyright notice(s) and this
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# permission notice appear in supporting documentation.
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Except as contained in this notice, the name of a copyright holder
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# shall not be used in advertising or otherwise to promote the sale, use
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# or other dealings in this Software without prior written authorization
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# of the copyright holder.
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# @(#)Makefile 1.63 08/03/07
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Build 32-bit or 64-bit?
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Package name used in tarballs
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Name used in server-specific rules in ../Makefile.inc
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Source tarball
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff ConniffSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(XORGSERVER_VERS).tar.bz2
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Patches to apply to source after unpacking, in order
ed163bac6ba352072300a51751488c2f2d71e922Jeff Conniff# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
e4f01a858850b47e385f5fa32c1b79fe457f9475Jeff ConniffSOURCE_PATCHES:sh=cat -s patch-list closed-src/patch-list | sed '/^\#/ d'
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Directory created by unpacking source
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff ConniffSOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(XORGSERVER_VERS)
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Man pages to apply Sun footer to & attributes to list
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# XXX: Need to adjust some of these to correct packages/stability
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff hw/xfree86/utils/xorgconfig/xorgconfig.man.pre \
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff -a '{Availability, SUNWxorg-server} {Interface Stability, Volatile}'
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Compiler to use - x86 MMX code only builds with gcc, not Sun Studio, so use
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# gcc on x86 for now, but keep Sun Studio on SPARC
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Binary built in tree
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff ConniffBUILD_TARGETS=$(XORGSERVER_BIN) $(BUILD_DIR)/mapfile-Xorg-externs
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Merge in additional sources from sun-src directory
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff -$(RM) -f $(SOURCE_DIR)/hw/xfree86/scanpci/pci.ids \
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Command line options to GNU autoconf configure script
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# XXX: --disable-dga
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff# Run configure script
4af2659c7f72aa2813a2eea32fcc568bbea27de7Jeff Conniff$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET) $(SOURCE_DIR)/configure
-e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xf86Sbus.h
# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
-rm -f $@
/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' >> $@