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