Makefile revision 590
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove###############################################################################
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo# Xvnc server Makefile
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Based on Fedora's vnc.spec from
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fe23a9535206b8c78aff2e73f8d0d0106a148a41Ryan Grove# Use subject to license terms.
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Permission is hereby granted, free of charge, to any person obtaining a
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# copy of this software and associated documentation files (the
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# "Software"), to deal in the Software without restriction, including
dff8d056ecfb52c863b7ad28e8ecea3a3789ad92Eric Ferraiuolo# without limitation the rights to use, copy, modify, merge, publish,
60721add39f50a2f904fa5736c6d04bb7aecdb63Eric Ferraiuolo# distribute, and/or sell copies of the Software, and to permit persons
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# to whom the Software is furnished to do so, provided that the above
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# copyright notice(s) and this permission notice appear in all copies of
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# the Software and that both the above copyright notice(s) and this
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# permission notice appear in supporting documentation.
981bda63386341f62cfef09ea0d6b522db9579a9Eric Ferraiuolo# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
981bda63386341f62cfef09ea0d6b522db9579a9Eric Ferraiuolo# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
981bda63386341f62cfef09ea0d6b522db9579a9Eric Ferraiuolo# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# Except as contained in this notice, the name of a copyright holder
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# shall not be used in advertising or otherwise to promote the sale, use
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# or other dealings in this Software without prior written authorization
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# of the copyright holder.
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# @(#)Makefile 1.14 08/11/26
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo# Package name used in tarballs
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo# Version number (used in path names)
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Source tarball
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Xorg server source tarball to use sources from
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveXORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveXORG_BUILD_DIR=$(SOURCE_DIR)/unix/xorg-x11-server-source
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Download site for source
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# - Master source site doesn't allow wget downloads, so we use a mirror
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove#SOURCE_URL=http://www.realvnc.com/dist/$(SOURCE_TARBALL_NAME)
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveSOURCE_URL=http://dlc.sun.com/osol/x/downloads/mirrors/$(SOURCE_TARBALL_NAME)
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Patches to apply to source after unpacking, in order
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Man pages to apply Sun footer to & attributes to list
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Common ones are here - source_gen target below has more with
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# different attributes/path set
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo unix/vncserver.man unix/x0vncserver/x0vncserver.man
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}'
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Compiler to use
60721add39f50a2f904fa5736c6d04bb7aecdb63Eric Ferraiuolo# Xvnc has to configure, build, and install in different directories due to
60721add39f50a2f904fa5736c6d04bb7aecdb63Eric Ferraiuolo# the mixed codebases and unusual directory layout
60721add39f50a2f904fa5736c6d04bb7aecdb63Eric FerraiuoloCONFIGURE_TARGETS=$(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo# Default rule to make, so that the source_gen rule below doesn't become
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo# default by virtue of being first
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo# Merge in additional sources from Xorg tarball & sun-src directory
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Use layout from Fedora RPM so their patches apply
dff8d056ecfb52c863b7ad28e8ecea3a3789ad92Eric Ferraiuolo# This step has to be done before including common/Makefile.inc so
dff8d056ecfb52c863b7ad28e8ecea3a3789ad92Eric Ferraiuolo# that patches applied in that step work correctly.
dff8d056ecfb52c863b7ad28e8ecea3a3789ad92Eric Ferraiuolo bzcat $(XORG_TARBALL) | (cd $(BUILD_DIR) ; tar -xf - )
dff8d056ecfb52c863b7ad28e8ecea3a3789ad92Eric Ferraiuolo @if [ "x$(XORG_SOURCE_PATCHES)" != "x" ] ; then \
60721add39f50a2f904fa5736c6d04bb7aecdb63Eric Ferraiuolo 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}'` ; \
18b15b90c6c4350ea262aa08b9fc735459722866Eric Ferraiuolo echo "$${PATCH_CMD}" ; \
dff8d056ecfb52c863b7ad28e8ecea3a3789ad92Eric Ferraiuolo (cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove (cp ../xorg/sun-src/mesa/Makefile.am $(XORG_BUILD_DIR)/GL/mesa/vbo)
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# Merge in additional sources from Xorg tarball & sun-src directory
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# Use layout from Fedora RPM so their patches apply
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# This step has to be done after including common/Makefile.inc since
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo# it depends on files created in that stage
5e276dd3a17da2c3a390c2c42830d08955670636Eric Ferraiuolo cp -p unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove -a '{Availability, SUNWvncviewer} {Interface Stability, Volatile}' \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}' \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove -p /usr/X11/bin/ unix/xc/programs/Xserver/Xvnc.man )
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Command line options to GNU autoconf configure script for vnc clients
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveVNC_CONFIG_OPTS= --with-installed-zlib --prefix=/usr \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove --mandir='$${prefix}/share/man' --libdir='$${exec_prefix}/lib/vnc' \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove# Command line options to GNU autoconf configure script for Xvnc
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan GroveXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS) \
84ae7c9d0c9d7a559d93a52393255678b6ac4e55Ryan Grove --disable-dga --disable-xfree86-utils --disable-dri \