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