Makefile revision 935
48c0c81cd6fabac9d3386406d97633780365b839coar###############################################################################
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
c4250200511e2babcf76be6da64a7f101250ab37jwoolley# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
a096f8d13bee05fd6ea8b9b50b6c2e818eace7d1striker# Permission is hereby granted, free of charge, to any person obtaining a
dba571e5c5a2586c7e2b382789f3250136ff7577jwoolley# copy of this software and associated documentation files (the "Software"),
dba571e5c5a2586c7e2b382789f3250136ff7577jwoolley# to deal in the Software without restriction, including without limitation
bf3d1782a29630335a1df535eb395355ab1cd154jwoolley# the rights to use, copy, modify, merge, publish, distribute, sublicense,
07847078a10fe4e9229cc08adda5f421cafc0665jwoolley# and/or sell copies of the Software, and to permit persons to whom the
0bd0176ce9f4321eeb506aa372d0bcc84befbf4cstriker# Software is furnished to do so, subject to the following conditions:
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# The above copyright notice and this permission notice (including the next
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# paragraph) shall be included in all copies or substantial portions of the
4214e98fc9045e5010e66f9a967bd6d68f40d342aaron# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8721697e2aece27b0e738519329f7976c72b27bfjerenkrantz# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
c25203fdca093d4504c51b4cd974ff60d5aa4fb1wrowe# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
91cacb801f6c0215b38322f6d2fc58cbfedfecfbjerenkrantz# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
df14f0d3a5191cdd7c4bb5b03acd135d43a6f51brbb# DEALINGS IN THE SOFTWARE.
9180a5933673ffb1af633c255ceee029340f3b1erbb# Package name used in tarballs
2900ab946a2d76b73a14cebfe2985d253f01c967stoddard# Version number (used in path names)
a548c09e6a8ca1b059d0e93b5256c6ccb2b3c3cdrbb# Checksums for upstream tarball
cf6bf6c34c936e6a6fe731dbce4a5c3c8bf8e9a3gsteinTARBALL_SHA1 = 2435ea2e3c34a4055350f7680a94cea580b92979
6f6f4a4bca281779d196acbdd5c017bb90858305trawick# Source tarball
8dd4618c4709236b4ea297d7250d282e463ce2d8rbbSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
bd929c73ef04789b7183b840d8db6e01d03a4d86rbb# Xorg server source tarball to use sources from
70f6f32765cfaadd6da8de6f0fea97ddd72d8fadmanojXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
2a6c49cfaef5979a5a06098f3ce987cd76769409manojXORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
af4c982a7cf4515f124935f99a329744035fc699slive# Download site for source
af4c982a7cf4515f124935f99a329744035fc699sliveSOURCE_URL=$(SF_DOWNLOADS_URL)/project/tigervnc/tigervnc/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe# Patches to apply to source after unpacking, in order
5c9a6bc911baa7cef34d64de59af1e8d6e09c13abrianp# Man pages to apply Sun footer to & attributes to list
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe# Common ones are here - Xvnc_source_fini target below has more with
bb2b4c21329be5f70a7b0b42c59cd8490d2ac43bwrowe# different attributes/path set
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}'
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe# Compiler to use
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe# Xvnc has to configure, build, and install in different directories due to
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe# the mixed codebases and unusual directory layout
4520f2a938626a879b33dac9fd940072b6c2bd42wroweMODULE_ADD_SOURCE_TARGETS=Xvnc_source_init Xvnc_source_fini
4520f2a938626a879b33dac9fd940072b6c2bd42wroweCONFIGURE_TARGETS=$(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
53573272227ec7c6a2bb9631934aea6c9dd1469egregamesBUILD_TARGETS=$(BUILD_TARGETS_common) $(BUILD_TARGETS_$(BUILD_TYPE))
4520f2a938626a879b33dac9fd940072b6c2bd42wroweINSTALL_TARGETS=$(INSTALL_TARGETS_common) $(INSTALL_TARGETS_$(BUILD_TYPE))
53573272227ec7c6a2bb9631934aea6c9dd1469egregames# Since we only build 64-bit versions of the Xorg servers on SPARC,
783e9d9e55a1ecb3c0eedb14493667ed642191c5rederpj# need to build a 32-bit version of the Xserver mdb module to allow
4520f2a938626a879b33dac9fd940072b6c2bd42wrowe# use with Xvnc on SPARC
574c4f095a6e4c5a9b51877c284527aa8bac1a59jwoolley# Merge in additional sources from Xorg tarball & sun-src directory
13402b2193f52031b2acfbee2b0965e02f3f29b4wrowe# This step has to be done before default_source, so that patches applied
f95a0b59eb24c631f15bd83e20c6cf823c432d83trawick# in that step work correctly.
f95a0b59eb24c631f15bd83e20c6cf823c432d83trawickXORG_SOURCE_INIT_TARGET = $(XORG_BUILD_DIR)/$(SOURCE_INIT_TARGET_FILE)
418f39e60a288f855ec033b566744489c3bbbf39trawickXORG_PATCHED_TARGET = $(XORG_BUILD_DIR)/$(PATCHED_TARGET_FILE)
13402b2193f52031b2acfbee2b0965e02f3f29b4wrowe (cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz SOURCE_PATCHES="$(XORG_SOURCE_PATCHES:%=../xorg/%)" \
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# Apply specific sets of Solaris attributes to various man pages
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# This step has to be done after default_source, since it depends
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz# on files created in that stage
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz -a '{Availability, SUNWvncviewer} {Interface Stability, Volatile}' \
783e9d9e55a1ecb3c0eedb14493667ed642191c5rederpj -p /usr/bin/ $(SOURCE_DIR)/unix/vncviewer/vncviewer.man
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz -a '{Availability, SUNWxvnc} {Interface Stability, Volatile}' \
f4cb04eb78da02a38fcdd87489dc7b660107d55fjerenkrantz -p $(X11_DIR)/bin/ $(SOURCE_DIR)/unix/xserver/hw/vnc/Xvnc.man
13402b2193f52031b2acfbee2b0965e02f3f29b4wrowe# Command line options to GNU autoconf configure script for vnc clients
783e9d9e55a1ecb3c0eedb14493667ed642191c5rederpj --mandir='$${prefix}/share/man' --libdir='$${exec_prefix}/lib/vnc' \
82455c2e3b6991846fbcbf0c9e41f57dbc681217brianp --localstatedir=/var --with-system-jpeg --without-simd
1b3f48fd6b1ccb8745f908e40156c5a85ca3c347jerenkrantz# Command line options to GNU autoconf configure script for Xvnc
b05930e6008f69bd323abe0c10f81f40ffd27983brianpXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS) \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe --disable-dga --disable-xfree86-utils --disable-config-hal \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe --disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe# Environment variable options to GNU autoconf configure script
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_LDFLAGS)"
f610c7c704235bc327dbe9b62982f5b3f8e30a77wrowe -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions$(ARCHLIBSUBDIR) \
56b2562cb4041a21bc313fde3204beabdb758800jwoolley -L$(PROTODIR)$(X11_SERVERMODS_DIR)/extensions$(ARCHLIBSUBDIR) \
f881b8be216de36c6b964324c772450bca38a4e6trawick# Needed by unix/xorg-x11-server-source/hw/vnc/Makefile.am to find libpixman
f881b8be216de36c6b964324c772450bca38a4e6trawick# headers in proto area after solaris-port.patch is applied
f881b8be216de36c6b964324c772450bca38a4e6trawick# Run configure scripts for vnc sources
b05930e6008f69bd323abe0c10f81f40ffd27983brianp $(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
b05930e6008f69bd323abe0c10f81f40ffd27983brianp $(CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
4c7dab038d90d7feb67ef8ddbfacc77be8c9dbf0jwoolley# Run configure script for Xvnc
8c8fbb8546af54582539898be704411a60058d85trawick $(CONFIG_ENV) $(SHELL) ./configure $(XVNC_CONFIG_OPTS) )
f9b8e29cfca92cf0a996e8ab17fa1a1f447cecc7stoddard $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
2fb49a1d25f38421a68d31b4cbb5d9293fdeafbewrowe && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
638a9edaf48cf003cd40ac25ee8c25f572107414stoddard cp -pf $(SOURCE_DIR)/unix/vncviewer/vncviewer.man \
638a9edaf48cf003cd40ac25ee8c25f572107414stoddard cp -pf $(SOURCE_DIR)/unix/x0vncserver/x0vncserver.man \
db2d668e6233d8949b35ee7f9f42f444758f9ce9rbb cp -pf xvnc-inetd.xml $(PROTODIR)/var/svc/manifest/application/x11/
db2d668e6233d8949b35ee7f9f42f444758f9ce9rbb# Java VNCviewer applet for connecting from a web browser
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron# Temporary special handling of Java build fix submitted upstream
1ea5221b240a8b41a07c6fb04aab5a73adcddabfaaron cp $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/Makefile $@
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz gpatch -d $(SOURCE_DIR) -p0 < applet-build.patch
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz$(JAVA_JAR_FILE): $(SOURCE_TARGETS) $(JAVA_MAKEFILE)
5d12baef135b5d3cb94745e007a1575398469724jerenkrantz $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
f881b8be216de36c6b964324c772450bca38a4e6trawick $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
dc098c7ce5d36179c504d09fc722d190683d0262aaron cp -pf $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/README \