Makefile revision 127
###############################################################################
#
# Xorg server Makefile
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use subject to license terms.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# to whom the Software is furnished to do so, provided that the above
# copyright notice(s) and this permission notice appear in all copies of
# the Software and that both the above copyright notice(s) and this
# permission notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder
# shall not be used in advertising or otherwise to promote the sale, use
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
# @(#)Makefile 1.36 07/03/19
#
# Package name used in tarballs
# Version number (used in path names)
# Source tarball
# Download site for source
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = \
xf1bpp.patch,-p1 \
xephyr.patch,-p1 \
immu.h.patch,-p1 \
IA.patch \
sparc.patch,-p1 \
# Directory created by unpacking source
# Prefix for installation
# Man pages to apply Sun footer to & attributes to list
-a '{Availability, SUNWxorg-server} {Interface Stability, Volatile}'
# Binary built in tree
# Merge in additional sources from sun-src directory
source_gen:: $(LNDIR)
MODULES_DIR='$${libdir}/modules$(MODULE_subdir)'
# Command line options to GNU autoconf configure script
# XXX: enable xorgcfg --disable-dga enable security
--bindir='$${exec_prefix}/bin/$(ARCHBINSUBDIR)' \
--with-default-font-path="$(FONTDIR)/TrueType/,$(FONTDIR)/Type1/,$(FONTDIR)/Type1/sun/,$(FONTDIR)/F3bitmaps/,$(FONTDIR)/misc/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/"
GCC_HEADERS:sh=gcc -print-search-dirs | awk -F: '$1 == "install" {printf "-idirafter %s/install-tools/include", $2}'
# Default DPMS settings for Solaris
-DDEFAULT_SUSPEND_TIME=1620000 \
-DDEFAULT_OFF_TIME=1800000
-I $(MESA_SRC_DIR)/include \
-I $(PROTODIR)$(X11_INCLUDES_DIR) \
# Uncomment to build debug
# OPT_CFLAGS = -g
# DEFAULT_GCC_CFLAGS = -g -O3 -fno-omit-frame-pointer -Wall
# Environment variable options to GNU autoconf configure script
PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \
-R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
LDFLAGS="$(GCC_PROG_LDFLAGS) -L/usr/sfw/lib$(ARCHLIBSUBDIR) -R/usr/sfw/lib$(ARCHLIBSUBDIR) $(LDPATH_ADD)" \
# Run configure script
# Environment variable options to use when building
LD_LIBRARY_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib/xorgcfg$(ARCHLIBSUBDIR)
#LD_OPTIONS="-z textwarn"
sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
-e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
#ifdef _LP64\
#define _XSERVER64 1\
#endif%' \
-rm -f $@
printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
printf '{\n global:\n' >> $@
/usr/ccs/bin/nm -g $(XORGSERVER_BIN) | 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' >> $@