Makefile revision 520
48c0c81cd6fabac9d3386406d97633780365b839coar###############################################################################
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Xvnc server Makefile
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Based on Fedora's vnc-4.1.2-21.fc8/vnc.spec
8163c8f6e2a9a8e4aba318d874c54a3155d57e21jerenkrantz# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
0bd0176ce9f4321eeb506aa372d0bcc84befbf4cstriker# Use subject to license terms.
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# Permission is hereby granted, free of charge, to any person obtaining a
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# copy of this software and associated documentation files (the
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# "Software"), to deal in the Software without restriction, including
d89c116f82699294ca744125723651c554bc5925wrowe# without limitation the rights to use, copy, modify, merge, publish,
4214e98fc9045e5010e66f9a967bd6d68f40d342aaron# distribute, and/or sell copies of the Software, and to permit persons
8721697e2aece27b0e738519329f7976c72b27bfjerenkrantz# to whom the Software is furnished to do so, provided that the above
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# copyright notice(s) and this permission notice appear in all copies of
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# the Software and that both the above copyright notice(s) and this
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# permission notice appear in supporting documentation.
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
ab71b233b3a36489e44a7b061c48293be0b17788jwoolley# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
571760de5e60c0b459cb11be45507b923cd023eejwoolley# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
571760de5e60c0b459cb11be45507b923cd023eejwoolley# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
9180a5933673ffb1af633c255ceee029340f3b1erbb# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
bcb6e1be6041dfeb549c8ea8d37f97ad4e90a0c3rbb# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
9bd71e35f5d26d26d23fe3a677401828e842ed72wrowe# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# Except as contained in this notice, the name of a copyright holder
b876b7bcf0ce3d232da723246d709e8dbbfe8762rbb# shall not be used in advertising or otherwise to promote the sale, use
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein# or other dealings in this Software without prior written authorization
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick# of the copyright holder.
8dd4618c4709236b4ea297d7250d282e463ce2d8rbb# @(#)Makefile 1.12 08/08/28
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# Package name used in tarballs
af4c982a7cf4515f124935f99a329744035fc699slive# Version number (used in path names)
af4c982a7cf4515f124935f99a329744035fc699slive# Source tarball
af4c982a7cf4515f124935f99a329744035fc699sliveSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
10270f6f94b2069d0d357805c140a9897449b9ccianh# Xorg server source tarball to use sources from
4b62424416882687387923b3130b96241503cbe0jerenkrantzXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantzXORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
630f5fc1277582643fe0f831a4830e15127bd047jwoolleyXORG_BUILD_DIR=$(SOURCE_DIR)/unix/xorg-x11-server-source
5ca8e11fadb6f7a8d9d0367c1800205c99d4bcd6jerenkrantz# Download site for source
45b0e1c775c1cfed6473c9e5304179ccb9609f53stoddard# - Master source site doesn't allow wget downloads, so we use a mirror
dbec4658981e4f9127e8676457c28d42932be7cdtrawick#SOURCE_URL=http://www.realvnc.com/dist/$(SOURCE_TARBALL_NAME)
5221a7188270ea10c4f0f8ad0a4367638894f9fbbrianpSOURCE_URL=http://ltsp.mirrors.tds.net/pub/ltsp/tarballs/$(SOURCE_TARBALL_NAME)
5221a7188270ea10c4f0f8ad0a4367638894f9fbbrianp# Patches to apply to source after unpacking, in order
5ebc546d1a3f1e4435a6838243ff912c2f53f806jerenkrantz# Man pages to apply Sun footer to & attributes to list
5ebc546d1a3f1e4435a6838243ff912c2f53f806jerenkrantz# Common ones are here - source_gen target below has more with
56b2562cb4041a21bc313fde3204beabdb758800jwoolley# different attributes/path set
56b2562cb4041a21bc313fde3204beabdb758800jwoolley unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
56b2562cb4041a21bc313fde3204beabdb758800jwoolley unix/vncserver.man unix/x0vncserver/x0vncserver.man
dee038ed61c64813e50d1ed34334fe2d5ab815fcjerenkrantz -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}'
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Compiler to use
f17588e04d2412bf1345783ed1d173322d728d6ftrawick# Xvnc has to configure, build, and install in different directories due to
f17588e04d2412bf1345783ed1d173322d728d6ftrawick# the mixed codebases and unusual directory layout
f17588e04d2412bf1345783ed1d173322d728d6ftrawickCONFIGURE_TARGETS=$(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Default rule to make, so that the source_gen rule below doesn't become
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# default by virtue of being first
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Merge in additional sources from Xorg tarball & sun-src directory
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Use layout from Fedora RPM so their patches apply
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# This step has to be done before including common/Makefile.inc so
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# that patches applied in that step work correctly.
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz bzcat $(XORG_TARBALL) | (cd $(BUILD_DIR) ; tar -xf - )
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz PATCH_CMD=`echo $$p | awk -F, '{if (NF > 1) FLAGS = $$2; else FLAGS="-p0" ; printf "gpatch -d $(XORG_SOURCE_DIR) %s < ../xorg/%s\n", FLAGS, $$1}'` ; \
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz echo "$${PATCH_CMD}" ; \
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantz (cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
630f5fc1277582643fe0f831a4830e15127bd047jwoolley# Merge in additional sources from Xorg tarball & sun-src directory
56b2562cb4041a21bc313fde3204beabdb758800jwoolley# Use layout from Fedora RPM so their patches apply
56b2562cb4041a21bc313fde3204beabdb758800jwoolley# This step has to be done after including common/Makefile.inc since
56b2562cb4041a21bc313fde3204beabdb758800jwoolley# it depends on files created in that stage
4c7dab038d90d7feb67ef8ddbfacc77be8c9dbf0jwoolley /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
bb2a72a6e2327ae4f177c9d26e9d433033cfc27eaaron -a '{Availability, SUNWvncviewer} {Interface Stability, Volatile}' \
8c8fbb8546af54582539898be704411a60058d85trawick /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
f9b8e29cfca92cf0a996e8ab17fa1a1f447cecc7stoddard -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}' \
f9b8e29cfca92cf0a996e8ab17fa1a1f447cecc7stoddard -p /usr/X11/bin/ unix/xc/programs/Xserver/Xvnc.man )
a23b1c5a74208b03884c09a6f9dd5d6c97fa6415trawick# Command line options to GNU autoconf configure script for vnc clients
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe --mandir='$${prefix}/share/man' --libdir='$${exec_prefix}/lib/vnc' \
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# Command line options to GNU autoconf configure script for Xvnc
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewroweXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS) \
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe --disable-xorg --disable-dmx --disable-xvfb --disable-xnest \
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe# Environment variable options to GNU autoconf configure script
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_LDFLAGS)"
638a9edaf48cf003cd40ac25ee8c25f572107414stoddard -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions$(ARCHLIBSUBDIR) \
db2d668e6233d8949b35ee7f9f42f444758f9ce9rbb -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions$(ARCHLIBSUBDIR) \
db2d668e6233d8949b35ee7f9f42f444758f9ce9rbb -R$(X11_SERVERMODS_DIR)/extensions/mesa/$(ARCHLIBSUBDIR) \
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron# Run configure scripts for vnc sources
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron (cd $(SOURCE_DIR)/common && autoreconf --install --force && \
a12f07383f9c286519fe88f559187148d5bd1c16aaron $(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron (cd $(SOURCE_DIR)/unix && autoreconf --install --force && \
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron $(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz# Run configure script for Xvnc
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz# Need to run delibtoolize to fix libtool interference with our linker
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz# flags, but need to make sure we use large pic flags (-KPIC/-fPIC)
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz$(XORG_BUILD_DIR)/Makefile: $(UNPACK_TARGET) $(SOURCE_DIR)/unix/Makefile
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz ACLOCAL="$(ACLOCAL_PATH)" autoreconf --install --force && \
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz $(CONFIG_ENV) $(SHELL) ./configure $(XVNC_CONFIG_OPTS) )
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz $(TOP)/common/delibtoolize.pl -P -s $(SOURCE_DIR)
5d12baef135b5d3cb94745e007a1575398469724jerenkrantzXvnc_build: $(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz (cd $(SOURCE_DIR)/common ; $(BUILD_ENV) $(MAKE) $(MAKEFLAGS))
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantz (cd $(SOURCE_DIR)/unix ; $(BUILD_ENV) $(MAKE) $(MAKEFLAGS))
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantz (cd $(XORG_BUILD_DIR) ; $(BUILD_ENV) $(MAKE) $(MAKEFLAGS))
b865daaa4ef731a7066ee6d97e2aae36c7743939jerenkrantz && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) -e install \
364dfd4527e6ce37b828a42e2c0bbdf9ba19a9b8gregames cp -pf $(SOURCE_DIR)/unix/vncviewer/vncviewer.man \