Makefile revision 122
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews###############################################################################
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Xorg server Makefile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Use subject to license terms.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# copy of this software and associated documentation files (the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# "Software"), to deal in the Software without restriction, including
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# without limitation the rights to use, copy, modify, merge, publish,
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# distribute, and/or sell copies of the Software, and to permit persons
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# to whom the Software is furnished to do so, provided that the above
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# copyright notice(s) and this permission notice appear in all copies of
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# the Software and that both the above copyright notice(s) and this
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# permission notice appear in supporting documentation.
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Except as contained in this notice, the name of a copyright holder
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# shall not be used in advertising or otherwise to promote the sale, use
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or other dealings in this Software without prior written authorization
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# of the copyright holder.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# @(#)Makefile 1.35 07/03/12
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPWD:sh=pwd
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserTOP=$(PWD)/../..
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserBUILD_TYPES_sun4=64
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_TYPES_i86pc=32 64
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserBUILD_TYPES:sh=arch | sed 's/^\(.*\)$/\$\(BUILD_TYPES_\1\)/'
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Package name used in tarballs
7e71f05d8643aca84914437c900cb716444507e4Tinderbox UserMODULE_NAME=xorg-server
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Version number (used in path names)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXORGSERVER_VERS=1.2.0
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Source tarball
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(XORGSERVER_VERS).tar.bz2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Download site for source
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserSOURCE_URL=$(XORG_RELEASES_URL)/xserver/$(SOURCE_TARBALL_NAME)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User# Patches to apply to source after unpacking, in order
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserSOURCE_PATCHES = \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews xf1bpp.patch,-p1 \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User xephyr.patch,-p1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews immu.h.patch,-p1 \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User server-libs.patch \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews dtrace.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User client-privates-leak.patch,-p1 \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews ast-driver.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sun-paths.patch \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater sun-extramodes.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sun-apm.patch \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater sun-kb-autodetect.patch \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater sun-keymappings.patch \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater sun-manpage.patch \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater cli-nolock.patch \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater cli-nobanner.patch \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt keep-aperture-open.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sun-virtual-mouse.patch \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater dtlogin-userinfo.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User IA.patch \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater xtsol.patch \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater sun-loginfo.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User xorgconfig.patch \
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater xorgcfg.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User amd64-loader-path.patch \
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater Xorg-mapfile.patch \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt bitstream.patch \
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater xevie.patch \
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater sparc.patch,-p1 \
be6c1c506161e6f45fcff5d0425f78801bc267c1Automatic Updater wsfb.patch \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt sparc-probe.patch \
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User glx-byteswap.patch \
43b94483957d3168796a816ed86cf097518817dcTinderbox User glx-impure.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User dri.patch \
8ec3c085233cedb22b05da36e2773c8f357a7e45Automatic Updater nvidia-autoconfig.patch \
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User autoconfig.patch \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User autoconfig2.patch \
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User 6406044.patch \
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User cfbmskbits.patch \
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User xf86ModesAdd.patch \
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User lg3d.patch
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# Directory created by unpacking source
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserSOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(XORGSERVER_VERS)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# Prefix for installation
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox UserXORGSERVER_PREFIX=$(X11_DIR)
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User
6ea2385360e9e2167e65f9286447da9eea189457Tinderbox User# Man pages to apply Sun footer to & attributes to list
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# XXX: Need to adjust some of these to correct packages/stability
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic UpdaterSUNTOUCHED_MANPAGES= \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User hw/xfree86/utils/gtf/gtf.man.pre \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater hw/xfree86/utils/cvt/cvt.man.pre \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater hw/xfree86/utils/pcitweak/pcitweak.man.pre \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater hw/xfree86/utils/scanpci/scanpci.man.pre \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User hw/xfree86/utils/xorgcfg/xorgcfg.man.pre \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater hw/xfree86/utils/xorgconfig/xorgconfig.man.pre \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User hw/xfree86/doc/man/Xorg.man.pre \
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater hw/xfree86/doc/man/xorg.conf.man.pre
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserSUNTOUCH_MAN_FLAGS= -p $(XORGSERVER_PREFIX)/bin/ \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -a '{Availability, SUNWxorg-server} {Interface Stability, Volatile}'
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Binary built in tree
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsXORGSERVER_BIN=$(SOURCE_DIR)/hw/xfree86/Xorg
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_TARGETS=$(XORGSERVER_BIN) $(BUILD_DIR)/mapfile-Xorg-externs
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude $(TOP)/common/Makefile.inc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Merge in additional sources from sun-src directory
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox Usersource_gen:: $(LNDIR)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox UserFONTDIR=$(X11_DIR)/lib/X11/fonts
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox UserMESA_SRC_DIR=$(TOP)/lib/mesa/$(BUILD_DIR)/Mesa-6.5.2
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox UserMODULES_DIR='$${libdir}/modules$(MODULE_subdir)'
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User# Command line options to GNU autoconf configure script
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User# XXX: enable xorgcfg --disable-dga enable security
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox UserCONFIG_OPTS_COMMON = \
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User --prefix=$(XORGSERVER_PREFIX) --mandir='$${prefix}/share/man' \
0e1dece22e128f9dfa723316a35c4b3f06912381Tinderbox User --bindir='$${exec_prefix}/bin/$(ARCHBINSUBDIR)' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User --enable-builddocs --disable-xdm-auth-1 --enable-xcsecurity \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --enable-shared --disable-static \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User --enable-kdrive --enable-xephyr \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --disable-install-setuid --enable-xorgcfg \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-vendor-name="Sun Microsystems, Inc." \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-vendor-web="http://sunsolve.sun.com/" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-os-name="`uname -srmv`" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-log-dir=/var/log --with-xkb-output=/var/run/xkb \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-module-dir=$(MODULES_DIR) \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-xkb-path='$${libdir}/X11/xkb' \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews --with-default-font-path="$(FONTDIR)/TrueType/,$(FONTDIR)/Type1/,$(FONTDIR)/Type1/sun/,$(FONTDIR)/F3bitmaps/,$(FONTDIR)/misc/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIG_OPTS_sun4=$(CONFIG_OPTS_COMMON)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIG_OPTS_i86pc=$(CONFIG_OPTS_COMMON) --with-mesa-source=$(MESA_SRC_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIG_OPTS:sh=arch | sed 's/^\(.*\)$/\$\(CONFIG_OPTS_\1\)/'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Need to append header path with gcc headers for MMX/SSE intrinsics
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsGCC_HEADERS:sh=gcc -print-search-dirs | awk -F: '$1 == "install" {printf "-idirafter %s/install-tools/include", $2}'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Default DPMS settings for Solaris
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic UpdaterDPMS_DEFINES= -DDEFAULT_STANDBY_TIME=1440000 \
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater -DDEFAULT_SUSPEND_TIME=1620000 \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -DDEFAULT_OFF_TIME=1800000
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterXORG_CPPFLAGS= \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -I $(MESA_SRC_DIR)/include \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater -I $(PROTODIR)$(X11_INCLUDES_DIR) \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater -I $(PROTODIR)$(X11_INCLUDES_DIR)/drm \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater -I $(PROTODIR)$(X11_INCLUDES_DIR)/X11/dri \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater -I $(PROTODIR)$(X11_INCLUDES_DIR)/X11/extensions \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater $(DPMS_DEFINES) -DSUNSOFT -DTSOL
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater# Uncomment to build debug
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# OPT_CFLAGS = -g
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater# DEFAULT_GCC_CFLAGS = -g -O3 -fno-omit-frame-pointer -Wall
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater# Environment variable options to GNU autoconf configure script
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterCONFIG_ENV_common = \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater INSTALL="$(TOP)/common/install-sh -c" CPPROG="cp -p" \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater PATH=$(PATH):/usr/sbin
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater
60a900e83bab52c3f023be66654f3ab023172778Automatic UpdaterLDPATH_ADD = -L$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
60a900e83bab52c3f023be66654f3ab023172778Automatic Updater -R$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIG_ENV_cc = CC=$(CC) CFLAGS="$(PROG_CFLAGS)" \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User LDFLAGS="$(PROG_LDFLAGS) $(LDPATH_ADD)" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews CPPFLAGS="$(XORG_CPPFLAGS)"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
2628293c6edaa41ed1407c42bb196083901e087bAutomatic UpdaterCONFIG_ENV_gcc = CC=$(GCC) CFLAGS="$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS)" \
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updater LDFLAGS="$(GCC_PROG_LDFLAGS) -L/usr/sfw/lib$(ARCHLIBSUBDIR) -R/usr/sfw/lib$(ARCHLIBSUBDIR) $(LDPATH_ADD)" \
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updater CPPFLAGS="$(GCC_HEADERS) $(XORG_CPPFLAGS)"
2628293c6edaa41ed1407c42bb196083901e087bAutomatic Updater
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIG_ENV_sun4= $(CONFIG_ENV_cc) $(CONFIG_ENV_common)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONFIG_ENV_i86pc= $(CONFIG_ENV_gcc) $(CONFIG_ENV_common)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIG_ENV:sh=arch | sed 's/^\(.*\)$/\$\(CONFIG_ENV_\1\)/'
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntBUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" ARCHBINSUBDIR="$(SUBDIR32)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
6f1205897504b8f50b1785975482c995888dd630Tinderbox UserBUILD_64_FLAGS_sun4=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserBUILD_64_FLAGS_i86pc=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" ARCHBINSUBDIR="$(SUBDIR64)"
6f1205897504b8f50b1785975482c995888dd630Tinderbox UserBUILD_64_FLAGS:sh=arch | sed 's/^\(.*\)$/\$\(BUILD_64_FLAGS_\1\)/'
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Run configure script
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(SOURCE_DIR)/Makefile: $(UNPACK_TARGET)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User (cd $(SOURCE_DIR) && automake && autoconf && \
d71e2e0c61df16ff37c9934c371a4a60c08974f7Mark Andrews $(CONFIG_ENV) ./configure $(CONFIG_OPTS) )
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(SOURCE_DIR)/hw/xfree86/xf1bpp && \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(MAKE) $(MFLAGS) maintainer-clean-generic)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Environment variable options to use when building
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_ENV= PATH=$(PATH):/usr/sbin \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews LD_LIBRARY_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib/xorgcfg$(ARCHLIBSUBDIR)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#LD_OPTIONS="-z textwarn"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(XORGSERVER_BIN): $(SOURCE_DIR)/Makefile
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt (cd $(SOURCE_DIR) ; $(BUILD_ENV) $(MAKE) $(MFLAGS))
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall_gen: $(XORGSERVER_BIN)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews (cd $(SOURCE_DIR) ; $(BUILD_ENV) $(MAKE) $(MFLAGS) -e install \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews DESTDIR=$(PROTODIR) CPPROG="cp -p" \
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews pkgconfigdir=/usr/lib/$(ARCHLIBSUBDIR)/pkgconfig )
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#ifdef _LP64\
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#define _XSERVER64 1\
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#endif%' \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(SOURCE_DIR)/include/xorg-server.h > $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xorg-server.h
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt mkdir -p $(PROTODIR)$(X11_DOC_DIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(BUILD_DIR)/mapfile-Xorg-externs: $(XORGSERVER_BIN)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -rm -f $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User printf '{\n global:\n' >> $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews /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' >> $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews printf '};\n' >> $@
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User