Makefile revision 822
7f007e36bec06aba6b3a0f84a64f2abf99edfcd8gstein###############################################################################
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# TigerVNC (Xvnc server & vncviewer) Makefile
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# Based on Fedora's tigervnc.spec revision 1.20 from
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# http://cvs.fedoraproject.org/viewvc/rpms/tigervnc/devel/tigervnc.spec
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# Use is subject to license terms.
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein# Permission is hereby granted, free of charge, to any person obtaining a
35330e0d79ceb8027223bbb8330a381b1f989d6etrawick# copy of this software and associated documentation files (the
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# "Software"), to deal in the Software without restriction, including
8dd4618c4709236b4ea297d7250d282e463ce2d8rbb# without limitation the rights to use, copy, modify, merge, publish,
09bd86d0db1114ee23eda0a6eb76ca055877a1cftrawick# distribute, and/or sell copies of the Software, and to permit persons
2deb319e6b3de239f45c16a3e9e836d44f1f7108rbb# to whom the Software is furnished to do so, provided that the above
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# copyright notice(s) and this permission notice appear in all copies of
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanoj# the Software and that both the above copyright notice(s) and this
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# permission notice appear in supporting documentation.
2a4b7a53f3573605d4f5686f03a67c37425dc22bgregames# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
5ac928b7a71a12bc1a6b42194c47edbff1dcc02fgregames# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
5ac928b7a71a12bc1a6b42194c47edbff1dcc02fgregames# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
2a4b7a53f3573605d4f5686f03a67c37425dc22bgregames# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
2a6c49cfaef5979a5a06098f3ce987cd76769409manoj# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
531c23ff01a2489646f0a2029097013b328d935agstein# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
50298555098049d0ebddd539668502fb5b796de0wrowe# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
50298555098049d0ebddd539668502fb5b796de0wrowe# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# Except as contained in this notice, the name of a copyright holder
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# shall not be used in advertising or otherwise to promote the sale, use
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# or other dealings in this Software without prior written authorization
bf9acc131271d18db51d30ace549d3c3b6a2b9fbrbb# of the copyright holder.
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# ident "@(#)Makefile 1.21 09/11/06 SMI"
447c6ce3ff08073c44f6785d5256271fcb877512wrowe# Package name used in tarballs
d208bda4a893cc81ed5d3ed1cdd7d706e012bd42stoddard# Version number (used in path names)
10b386767f6c87b45937244371cb751f0b454d16wrowe# Source tarball
863ec32e13d6c9619414c48b51109f3dca99cbc6wroweSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
75960f20f88dad6bc67892c711c429946063d133stoddard# Xorg server source tarball to use sources from
75960f20f88dad6bc67892c711c429946063d133stoddardXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
75960f20f88dad6bc67892c711c429946063d133stoddardXORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
75960f20f88dad6bc67892c711c429946063d133stoddard# Download site for source
10b386767f6c87b45937244371cb751f0b454d16wroweSOURCE_URL=$(SF_DOWNLOADS_URL)/project/tigervnc/tigervnc/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
10b386767f6c87b45937244371cb751f0b454d16wrowe# Patches to apply to source after unpacking, in order
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick# Man pages to apply Sun footer to & attributes to list
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick# Common ones are here - source_gen target below has more with
79d5106a9b65b956d646f5daae4b94bc79e315b8trawick# different attributes/path set
9eccc0a669a3e711629345b357c46acce5fefdb4gstein unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
750fcd3495b59eff6d4844409ae1dfb46d026059gstein -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}'
750fcd3495b59eff6d4844409ae1dfb46d026059gstein# Compiler to use
750fcd3495b59eff6d4844409ae1dfb46d026059gstein# Xvnc has to configure, build, and install in different directories due to
750fcd3495b59eff6d4844409ae1dfb46d026059gstein# the mixed codebases and unusual directory layout
9eccc0a669a3e711629345b357c46acce5fefdb4gsteinMODULE_ADD_SOURCE_TARGETS=Xvnc_source_init Xvnc_source_fini
e9cfc70fceb74521ba0814cdc88808c7d4d00c97gsteinCONFIGURE_TARGETS=$(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
26ef89f716a43048630e73f527dd2f0ee84f72c2rbbBUILD_TARGETS=$(BUILD_TARGETS_common) $(BUILD_TARGETS_$(BUILD_TYPE))
9eccc0a669a3e711629345b357c46acce5fefdb4gsteinINSTALL_TARGETS=$(INSTALL_TARGETS_common) $(INSTALL_TARGETS_$(BUILD_TYPE))
ec75f189410513ab8f6e1173a9d9d277ebec9ce7gstein# Merge in additional sources from Xorg tarball & sun-src directory
ec75f189410513ab8f6e1173a9d9d277ebec9ce7gstein# This step has to be done before default_source, so that patches applied
ec75f189410513ab8f6e1173a9d9d277ebec9ce7gstein# in that step work correctly.
ec75f189410513ab8f6e1173a9d9d277ebec9ce7gstein bzcat $(XORG_TARBALL) | (cd $(BUILD_DIR) ; tar -xf - )
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard 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}'` ; \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard echo "$${PATCH_CMD}" ; \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard (cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
33a70d93b992bbb63b809c24df29451f38f017c1rbb# Apply specific sets of Solaris attributes to various man pages
bebc7b9445f95339822c26bfd470349006f9ec40stoddard# This step has to be done after default_source, since it depends
bebc7b9445f95339822c26bfd470349006f9ec40stoddard# on files created in that stage
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard -a '{Availability, SUNWvncviewer} {Interface Stability, Volatile}' \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard /usr/perl5/bin/perl $(TOP)/common/suntouch-manpages.pl \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}' \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard# Command line options to GNU autoconf configure script for vnc clients
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddardVNC_CONFIG_OPTS= --with-installed-zlib --prefix=/usr \
7bce59d998f2e5ca1cb60038ef6c1d0817605d62stoddard --mandir='$${prefix}/share/man' --libdir='$${exec_prefix}/lib/vnc' \
93db592309ba9e5ab230f67611a2c74fece9cdb2marc# Command line options to GNU autoconf configure script for Xvnc
93db592309ba9e5ab230f67611a2c74fece9cdb2marcXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS) \
93db592309ba9e5ab230f67611a2c74fece9cdb2marc --disable-dga --disable-xfree86-utils --disable-config-hal \
93db592309ba9e5ab230f67611a2c74fece9cdb2marc --disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
b187d568e1507d75139ebc13ca945b38fc05d55cstoddard# Environment variable options to GNU autoconf configure script
1c6fb1e726ce22694de0e9a957adb67b929e5d4fstoddard LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_LDFLAGS)"
10b386767f6c87b45937244371cb751f0b454d16wrowe -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions$(ARCHLIBSUBDIR) \
50298555098049d0ebddd539668502fb5b796de0wrowe -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions$(ARCHLIBSUBDIR) \
75960f20f88dad6bc67892c711c429946063d133stoddard# Needed by unix/xorg-x11-server-source/hw/vnc/Makefile.am to find libpixman
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard# headers in proto area after solaris-port.patch is applied
a5ed555df952c85bc1b179f5981e8a6c54ba16e6stoddard# Run configure scripts for vnc sources
1e585ba09ea32272e63c4c39c35491e975d21d98stoddard $(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
0bff2f28ef945280c17099c142126178a78e1e54manoj $(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
302dc1f7b3feee23a91ad8f3cf3cb2edd95a557bmanoj# Run configure script for Xvnc
447c6ce3ff08073c44f6785d5256271fcb877512wrowe $(CONFIG_ENV) $(SHELL) ./configure $(XVNC_CONFIG_OPTS) )
447c6ce3ff08073c44f6785d5256271fcb877512wrowe $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gstein $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
0eb7ca6cf812d98c534661ac474e873a32bf6325gstein && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
e636eba7474e0010b5c7198af1c2fe5ad8652dbbmanoj cp -pf $(SOURCE_DIR)/unix/x0vncserver/x0vncserver.man \
e636eba7474e0010b5c7198af1c2fe5ad8652dbbmanoj cp -pf xvnc-inetd.xml $(PROTODIR)/var/svc/manifest/application/x11/
531c23ff01a2489646f0a2029097013b328d935agstein# Java VNCviewer applet for connecting from a web browser
281da4c02cf40c663298ded7e4e5b913a8f8b814gstein# Temporary special handling of Java build fix submitted upstream
2f728b2e8555fee1b7cc11e886488692f2575fbddougm cp $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/Makefile $@
64ad864fa0f4493eebb181e393b40a8a90beccb9coar $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
64ad864fa0f4493eebb181e393b40a8a90beccb9coar $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
64ad864fa0f4493eebb181e393b40a8a90beccb9coar cp -pf $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/README \