Makefile revision 919
7f007e36bec06aba6b3a0f84a64f2abf99edfcd8gstein###############################################################################
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Xorg server Makefile
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
8f5dca296674091bd47a7846d0cc16ce5bbc272ejerenkrantz# Use is subject to license terms.
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# Permission is hereby granted, free of charge, to any person obtaining a
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# copy of this software and associated documentation files (the "Software"),
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# to deal in the Software without restriction, including without limitation
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# the rights to use, copy, modify, merge, publish, distribute, sublicense,
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley# and/or sell copies of the Software, and to permit persons to whom the
571760de5e60c0b459cb11be45507b923cd023eejwoolley# Software is furnished to do so, subject to the following conditions:
9180a5933673ffb1af633c255ceee029340f3b1erbb# The above copyright notice and this permission notice (including the next
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb# paragraph) shall be included in all copies or substantial portions of the
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
b876b7bcf0ce3d232da723246d709e8dbbfe8762rbb# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# DEALINGS IN THE SOFTWARE.
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# Build 32-bit or 64-bit?
af4c982a7cf4515f124935f99a329744035fc699slive# Package name used in tarballs
af4c982a7cf4515f124935f99a329744035fc699slive# Version number (used in path names)
7fe18c15b669db9d191859695901dc4fcf3829dawrowe# Checksums for upstream tarball
7fe18c15b669db9d191859695901dc4fcf3829dawroweTARBALL_SHA1 = c385293b66a6b0bc6bad648588f611d844c26ee7
7fe18c15b669db9d191859695901dc4fcf3829dawrowe# Patches to apply to source after unpacking, in order
976501adbc040220270f7d1d77c4b8373033be69wrowe# *** Moved to patch-list file so they can be shared between Xorg & Xvnc builds
976501adbc040220270f7d1d77c4b8373033be69wrowe# Used in rules shared between Xorg & Xvnc builds in Makefile.inc
976501adbc040220270f7d1d77c4b8373033be69wrowe# to allow for different source layouts
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# Man pages to apply Sun footer to & attributes to list
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# XXX: Need to adjust some of these to correct packages/stability
dc96a5e6f9af3c514df4c61ab9468fcf97f9846fwrowe# Binary built in tree
976501adbc040220270f7d1d77c4b8373033be69wroweBUILD_TARGETS=$(XORGSERVER_BIN) build_mdb set-elf-comments \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard# Need to regenerate autoconf/automake files after patching
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard# Command line options to GNU autoconf configure script
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard# Need to override LD setting to add -xarch flags that libtool strips
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard# XXX: --disable-dga
38b116de532efb28defc6a0aaa71fb8c46487190gstein# pkg-config files that need to have -R added
38b116de532efb28defc6a0aaa71fb8c46487190gstein# Remove compiler specific visibility flag that breaks builds of drivers
38b116de532efb28defc6a0aaa71fb8c46487190gstein# with other compilers
e2979c854f6ff7c056d75f6f1ae49767ce3b6d37jerenkrantzMODULE_FIX_PC_FLAGS= -e 's|\@symbol_visibility\@||'
abf9f8824312153040e1ee588a50058c67a4081ajerenkrantz# Need to use GNU Make to build due to hw/xfree86/loader
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz# Additional install targets beyond the defaults
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzMODULE_ADD_INSTALL_TARGETS=install_extras install_mdb install_pc_common
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzMODULE_ADD_INSTALL_TARGETS += $(EXTRA_INSTALL_$(MACH))
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz# Have to avoid dependency loop between install_pc_copy and
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz# install_pkgconfig_uninstalled
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantzINSTALL_PCU_DEPS = $(INSTALL_TARGETS:install_pc_copy=)
d90f6d052b76ed4cf5e27e8292a22c2c97bb5134jerenkrantz# Merge in additional sources from sun-src directory
38b116de532efb28defc6a0aaa71fb8c46487190gstein sed -e 's%#define XF86DRI 1%/* #define XF86DRI 1 */%' \
38b116de532efb28defc6a0aaa71fb8c46487190gstein -e 's%^.* _XSERVER64 .*$$%#include <sys/isa_defs.h>\
38b116de532efb28defc6a0aaa71fb8c46487190gstein#ifdef _LP64\
38b116de532efb28defc6a0aaa71fb8c46487190gstein#define _XSERVER64 1\
e2979c854f6ff7c056d75f6f1ae49767ce3b6d37jerenkrantz $(SOURCE_DIR)/include/xorg-server.h > $(SDK_INCLUDES_DIR)/xorg-server.h
38b116de532efb28defc6a0aaa71fb8c46487190gstein cp -pf $(SOURCE_DIR)/mi/mioverlay.h $(SDK_INCLUDES_DIR)/mioverlay.h
7fe18c15b669db9d191859695901dc4fcf3829dawrowe cp -pf $(SOURCE_DIR)/hw/xfree86/os-support/bus/xf86Sbus.h $(SDK_INCLUDES_DIR)/xf86Sbus.h
7fe18c15b669db9d191859695901dc4fcf3829dawrowe cp -pf $(SOURCE_DIR)/hw/xfree86/dri/*.h $(SDK_INCLUDES_DIR)/
7fe18c15b669db9d191859695901dc4fcf3829dawrowe -rm -f $(SDK_INCLUDES_DIR)/xf1bpp.h $(SDK_INCLUDES_DIR)/xf4bpp.h
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron cp -pf $(SOURCE_DIR)/hw/xfree86/doc/README.* $(PROTODIR)$(X11_DOC_DIR)/
28a8a81ca24adf72631caa248b2d37a8f0f645c2aaron mkdir -p $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor
e04911e1869585acf01ee0876c2752afbc91af71jerenkrantz $(PROTODIR)$(X11_DIR)/share/hal/fdi/policy/10osvendor/10-x11-input.fdi
f53df16c9cfebf5cbf9e3c4e929f8f8bc8f66d71jerenkrantz# Workaround bug in installing pkgconfig file to wrong directory in 64-bit
f53df16c9cfebf5cbf9e3c4e929f8f8bc8f66d71jerenkrantz -rm -f $(PROTODIR)$(PKGCONFIG_DIR)/xorg-server.pc
b84f66c93f820824b1d5455181f55598b766319cwrowe# Install xorg-server.pc in 32-bit pkgconfig dir on SPARC too
b84f66c93f820824b1d5455181f55598b766319cwroweinstall_pc_copy: install_pc_common install_pkgconfig_uninstalled
7fe18c15b669db9d191859695901dc4fcf3829dawrowe cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server.pc \
7fe18c15b669db9d191859695901dc4fcf3829dawrowe cp -pf $(PROTODIR)$(PKGCONFIG_DIR_64)/xorg-server-uninstalled.pc \
7fe18c15b669db9d191859695901dc4fcf3829dawrowe $(PROTODIR)$(PKGCONFIG_DIR_32)/xorg-server-uninstalled.pc
d4a4220020a793457962e3784641b0b14caaed5fjwoolley printf '# Functions exported by Xorg server to loadable modules\n\n' > $@
bca84f0b0ca4f3466ac2f845f1bdcdede7f34d91rbb /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' >> $@