Makefile revision 618
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov###############################################################################
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Xorg server Makefile
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Use subject to license terms.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Permission is hereby granted, free of charge, to any person obtaining a
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# copy of this software and associated documentation files (the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# "Software"), to deal in the Software without restriction, including
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# without limitation the rights to use, copy, modify, merge, publish,
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# distribute, and/or sell copies of the Software, and to permit persons
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# to whom the Software is furnished to do so, provided that the above
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# copyright notice(s) and this permission notice appear in all copies of
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# the Software and that both the above copyright notice(s) and this
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# permission notice appear in supporting documentation.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Except as contained in this notice, the name of a copyright holder
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# shall not be used in advertising or otherwise to promote the sale, use
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# or other dealings in this Software without prior written authorization
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# of the copyright holder.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# @(#)Makefile 1.73 09/01/27
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Build 32-bit or 64-bit?
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Package name used in tarballs
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Version number (used in path names)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Patches to apply to source after unpacking, in order
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Man pages to apply Sun footer to & attributes to list
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# XXX: Need to adjust some of these to correct packages/stability
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov hw/xfree86/utils/xorgcfg/xorgcfg.man.pre \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov hw/xfree86/utils/xorgconfig/xorgconfig.man.pre \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovMODULE_SUNTOUCH_MAN_FLAGS= -p $(MODULE_PREFIX)/bin/
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Compiler to use - x86 MMX code only builds with gcc, not Sun Studio, so use
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# gcc on x86 for now, but keep Sun Studio on SPARC
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovMODULE_COMPILER=$(MODULE_COMPILER_$(MACH))
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Binary built in tree
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovBUILD_TARGETS=$(XORGSERVER_BIN) set-elf-comments \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Additional license files to install
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Need to regenerate autoconf/automake files after patching
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Command line options to GNU autoconf configure script
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Need to override LD setting to add -xarch flags that libtool strips
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# XXX: --disable-dga
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovMODULE_CONFIG_OPTS = $(XSERVER_CONFIG_OPTS) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov --enable-builddocs --enable-xorgcfg --enable-xprint \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov --enable-kdrive --enable-xephyr --disable-xsdl \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# pkg-config files that need to have -R added
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Additional install targets beyond the defaults
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovMODULE_ADD_INSTALL_TARGETS=install_extras $(EXTRA_INSTALL_$(MACH))
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Merge in additional sources from sun-src directory
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovSDK_INCLUDES_DIR=$(PROTODIR)$(X11_INCLUDES_DIR)/xorg/
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#define _XSERVER64 1\
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -p $(SOURCE_DIR)/mi/mioverlay.h $(SDK_INCLUDES_DIR)/mioverlay.h
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -p $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(SDK_INCLUDES_DIR)/xf86Sbus.h
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -p $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov -rm -f $(SDK_INCLUDES_DIR)/xf1bpp.h $(SDK_INCLUDES_DIR)/xf4bpp.h
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov mkdir -p $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -p $(SOURCE_DIR)/config/x11-input.fdi \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor/10-x11-input.fdi
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server.pc \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server.pc
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server-uninstalled.pc \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov /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' >> $@