Makefile revision 122
48c0c81cd6fabac9d3386406d97633780365b839coar###############################################################################
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Xorg server Makefile
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# Use subject to license terms.
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# Permission is hereby granted, free of charge, to any person obtaining a
d89c116f82699294ca744125723651c554bc5925wrowe# copy of this software and associated documentation files (the
4214e98fc9045e5010e66f9a967bd6d68f40d342aaron# "Software"), to deal in the Software without restriction, including
8721697e2aece27b0e738519329f7976c72b27bfjerenkrantz# without limitation the rights to use, copy, modify, merge, publish,
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# distribute, and/or sell copies of the Software, and to permit persons
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# to whom the Software is furnished to do so, provided that the above
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# copyright notice(s) and this permission notice appear in all copies of
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# the Software and that both the above copyright notice(s) and this
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# permission notice appear in supporting documentation.
571760de5e60c0b459cb11be45507b923cd023eejwoolley# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
571760de5e60c0b459cb11be45507b923cd023eejwoolley# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9180a5933673ffb1af633c255ceee029340f3b1erbb# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
9bd71e35f5d26d26d23fe3a677401828e842ed72wrowe# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein# Except as contained in this notice, the name of a copyright holder
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick# shall not be used in advertising or otherwise to promote the sale, use
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# or other dealings in this Software without prior written authorization
8dd4618c4709236b4ea297d7250d282e463ce2d8rbb# of the copyright holder.
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbb# @(#)Makefile 1.35 07/03/12
af4c982a7cf4515f124935f99a329744035fc699sliveBUILD_TYPES:sh=arch | sed 's/^\(.*\)$/\$\(BUILD_TYPES_\1\)/'
af4c982a7cf4515f124935f99a329744035fc699slive# Package name used in tarballs
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantz# Version number (used in path names)
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantz# Source tarball
4b62424416882687387923b3130b96241503cbe0jerenkrantzSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(XORGSERVER_VERS).tar.bz2
0d2f57cf389a981efa5e98d9b451c6baf0af12bfjerenkrantz# Download site for source
0d2f57cf389a981efa5e98d9b451c6baf0af12bfjerenkrantzSOURCE_URL=$(XORG_RELEASES_URL)/xserver/$(SOURCE_TARBALL_NAME)
a12b7938cf47a0017a70ba195bbce035aa040e38aaron# Patches to apply to source after unpacking, in order
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# Directory created by unpacking source
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewroweSOURCE_DIR=$(BUILD_DIR)/$(MODULE_NAME)-$(XORGSERVER_VERS)
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# Prefix for installation
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# Man pages to apply Sun footer to & attributes to list
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# XXX: Need to adjust some of these to correct packages/stability
83d91d60d00dc345bfbcbc48ff206db4a6b23b2eaaron -a '{Availability, SUNWxorg-server} {Interface Stability, Volatile}'
83d91d60d00dc345bfbcbc48ff206db4a6b23b2eaaron# Binary built in tree
83d91d60d00dc345bfbcbc48ff206db4a6b23b2eaaronBUILD_TARGETS=$(XORGSERVER_BIN) $(BUILD_DIR)/mapfile-Xorg-externs
db2d668e6233d8949b35ee7f9f42f444758f9ce9rbb# Merge in additional sources from sun-src directory
a12f07383f9c286519fe88f559187148d5bd1c16aaron# Command line options to GNU autoconf configure script
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron# XXX: enable xorgcfg --disable-dga enable security
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz --prefix=$(XORGSERVER_PREFIX) --mandir='$${prefix}/share/man' \
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz --bindir='$${exec_prefix}/bin/$(ARCHBINSUBDIR)' \
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz --enable-builddocs --disable-xdm-auth-1 --enable-xcsecurity \
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz --with-log-dir=/var/log --with-xkb-output=/var/run/xkb \
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantz --with-default-font-path="$(FONTDIR)/TrueType/,$(FONTDIR)/Type1/,$(FONTDIR)/Type1/sun/,$(FONTDIR)/F3bitmaps/,$(FONTDIR)/misc/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/"
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantzCONFIG_OPTS_i86pc=$(CONFIG_OPTS_COMMON) --with-mesa-source=$(MESA_SRC_DIR)
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantzCONFIG_OPTS:sh=arch | sed 's/^\(.*\)$/\$\(CONFIG_OPTS_\1\)/'
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantz# Need to append header path with gcc headers for MMX/SSE intrinsics
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantzGCC_HEADERS:sh=gcc -print-search-dirs | awk -F: '$1 == "install" {printf "-idirafter %s/install-tools/include", $2}'
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantz# Default DPMS settings for Solaris
364dfd4527e6ce37b828a42e2c0bbdf9ba19a9b8gregames# Uncomment to build debug
dc098c7ce5d36179c504d09fc722d190683d0262aaron# OPT_CFLAGS = -g
0bcb1fe39dfaacf9745b6633f5cc9ebc8e2596caaaron# DEFAULT_GCC_CFLAGS = -g -O3 -fno-omit-frame-pointer -Wall
0bcb1fe39dfaacf9745b6633f5cc9ebc8e2596caaaron# Environment variable options to GNU autoconf configure script
0bcb1fe39dfaacf9745b6633f5cc9ebc8e2596caaaron PKG_CONFIG_PATH=$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR)/pkgconfig:$(TOP)/common/pc-files/$(BUILD_DIR):/usr/lib$(ARCHLIBSUBDIR)/pkgconfig \
0bcb1fe39dfaacf9745b6633f5cc9ebc8e2596caaaron INSTALL="$(TOP)/common/install-sh -c" CPPROG="cp -p" \
33f5961d34a8b5390cebad0543b3ebe67830e5d7jerenkrantzLDPATH_ADD = -L$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR) \
33f5961d34a8b5390cebad0543b3ebe67830e5d7jerenkrantzCONFIG_ENV_cc = CC=$(CC) CFLAGS="$(PROG_CFLAGS)" \
33f5961d34a8b5390cebad0543b3ebe67830e5d7jerenkrantzCONFIG_ENV_gcc = CC=$(GCC) CFLAGS="$(DEFAULT_GCC_CFLAGS) $(ARCH_GCC_FLAGS)" \
54e1babd5a5a56c576eeeace54110150769cc916coar LDFLAGS="$(GCC_PROG_LDFLAGS) -L/usr/sfw/lib$(ARCHLIBSUBDIR) -R/usr/sfw/lib$(ARCHLIBSUBDIR) $(LDPATH_ADD)" \
54e1babd5a5a56c576eeeace54110150769cc916coarCONFIG_ENV_i86pc= $(CONFIG_ENV_gcc) $(CONFIG_ENV_common)
54e1babd5a5a56c576eeeace54110150769cc916coarCONFIG_ENV:sh=arch | sed 's/^\(.*\)$/\$\(CONFIG_ENV_\1\)/'
54e1babd5a5a56c576eeeace54110150769cc916coarBUILD_32_FLAGS=ARCH_GCC_FLAGS="$(ARCH32_GCC_FLAGS)" ARCHBINSUBDIR="$(SUBDIR32)"
54e1babd5a5a56c576eeeace54110150769cc916coarBUILD_64_FLAGS_sun4=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)"
54e1babd5a5a56c576eeeace54110150769cc916coarBUILD_64_FLAGS_i86pc=ARCH_GCC_FLAGS="$(ARCH64_GCC_FLAGS)" ARCHBINSUBDIR="$(SUBDIR64)"
54e1babd5a5a56c576eeeace54110150769cc916coarBUILD_64_FLAGS:sh=arch | sed 's/^\(.*\)$/\$\(BUILD_64_FLAGS_\1\)/'
949aa7bba7f804faa8e6b08cad42a98fc0255d85jerenkrantz# Run configure script
e0427bf8e52a8fb920cb8b6adb5cdb3b6535b7fecoar# Environment variable options to use when building
07021d9f405849228b859d9fb4b877f20e4fbba3jerenkrantz LD_LIBRARY_PATH=$(PROTODIR)$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR):$(PROTODIR)$(X11_DIR)/lib/xorgcfg$(ARCHLIBSUBDIR)
07021d9f405849228b859d9fb4b877f20e4fbba3jerenkrantz#LD_OPTIONS="-z textwarn"
f126ee03179eb54308118f1ec3de5a7b461685d8aaron (cd $(SOURCE_DIR) ; $(BUILD_ENV) $(MAKE) $(MFLAGS) -e install \
f126ee03179eb54308118f1ec3de5a7b461685d8aaron sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
f126ee03179eb54308118f1ec3de5a7b461685d8aaron -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
f126ee03179eb54308118f1ec3de5a7b461685d8aaron#ifdef _LP64\
f126ee03179eb54308118f1ec3de5a7b461685d8aaron#define _XSERVER64 1\
f126ee03179eb54308118f1ec3de5a7b461685d8aaron $(SOURCE_DIR)/include/xorg-server.h > $(PROTODIR)$(X11_INCLUDES_DIR)/xorg/xorg-server.h
109faf633e12ab0bbdd602c7addc795cce59e8addreid cp -p $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
109faf633e12ab0bbdd602c7addc795cce59e8addreid printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
109faf633e12ab0bbdd602c7addc795cce59e8addreid /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' >> $@