Makefile revision 965
235N/A###############################################################################
235N/A#
822N/A# TigerVNC (Xvnc server & vncviewer) Makefile
822N/A# Based on Fedora's tigervnc.spec revision 1.20 from
822N/A# http://cvs.fedoraproject.org/viewvc/rpms/tigervnc/devel/tigervnc.spec
235N/A#
1438N/A# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
235N/A#
235N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
235N/A#
235N/A#
235N/A
822N/A# Package name used in tarballs
235N/AMODULE_NAME=tigervnc
970N/A
970N/A# Version number (used in path names)
970N/AMODULE_VERSION=1.0.0
970N/A
970N/A# Checksums for upstream tarball
970N/ATARBALL_MD5 = 622c6689a66651419b5431efdee99d5a
970N/ATARBALL_SHA1 = 2435ea2e3c34a4055350f7680a94cea580b92979
1003N/A
1339N/A# Source tarball
1360N/ASOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
970N/ASOURCE_TARBALL_NAME_SET=yes
235N/A
1252N/A# Xorg server source tarball to use sources from
235N/AXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
911N/AXORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
1252N/AXORG_BUILD_DIR=$(SOURCE_DIR)/unix/xserver
1252N/A
911N/A# Download site for source
235N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/project/tigervnc/tigervnc/$(MODULE_VERSION)/$(SOURCE_TARBALL_NAME)
493N/ASOURCE_URL_SET=yes
493N/ASOURCE_UNCOMPRESS=gzcat
235N/A
235N/A# Patches to apply to source after unpacking, in order
235N/ASOURCE_PATCHES = \
1422N/A upstream-xorg-version.patch,-p1 \
1422N/A upstream-input-refactor.patch,-p1 \
235N/A tigervnc-port-to-1.7.patch \
1124N/A tigervnc-xserver17.patch \
1422N/A vnc-samemachine-ipv6.patch,-p1 \
1422N/A c++public.patch,-p1 \
1124N/A vncserver-urandom.patch,-p1 \
235N/A vnc-nobuildtime.patch \
1252N/A vnc-nohttpd.patch \
235N/A vncviewer-connect.patch,-p1 \
235N/A upstream-modkeystick.patch,-p0 \
235N/A solaris-port.patch \
1351N/A capslock.patch
1276N/A
1276N/A
1351N/A# Man pages to apply Sun footer to & attributes to list
1276N/ASUNTOUCHED_MANPAGES= \
1276N/A unix/xserver/hw/vnc/Xvnc.man unix/vncviewer/vncviewer.man \
1276N/A unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
1276N/A unix/vncserver.man unix/x0vncserver/x0vncserver.man
1438N/ASUN_PACKAGE = SUNWxvnc
1276N/AMODULE_STABILITY = Volatile
1276N/A
1276N/A# Additional package name used for vncviewer package
1276N/AVNCVIEWER_PKGNAME=SUNWvncviewer
1276N/A
1379N/A# Override specific attributes for specific man pages
1458N/AMODULE_SUNTOUCH_MAN_FLAGS= \
1469N/A $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
235N/ASUNTOUCH_MAN_FLAGS_vncviewer = -o '{Availability, $(VNCVIEWER_PKGNAME)}' \
1124N/A -o '{Interface Stability, Path: Committed, Options: Volatile}'
1124N/A
1124N/A# Compiler to use
1422N/AMODULE_COMPILER=suncc
1422N/AMODULE_COMPILER_SET=yes
1422N/A
1389N/A# Xvnc has to configure, build, and install in different directories due to
1389N/A# the mixed codebases and unusual directory layout
1389N/A$(NO_RECURSE)MODULE_ADD_SOURCE_TARGETS=Xvnc_source_init
970N/A$(NO_RECURSE)MODULE_SOURCE_DEPS = Xvnc_source_init
970N/ACONFIGURE_TARGETS=$(SOURCE_DIR)/unix/Makefile $(XORG_BUILD_DIR)/Makefile
970N/ACONFIGURE_TARGETS_SET=yes
970N/ABUILD_TARGETS_common=Xvnc_build set-elf-comments
970N/ABUILD_TARGETS_32=java_build
970N/ABUILD_TARGETS=$(BUILD_TARGETS_common) $(BUILD_TARGETS_$(BUILD_TYPE))
970N/ABUILD_TARGETS_SET=yes
947N/AINSTALL_TARGETS_common=Xvnc_install_module
235N/AINSTALL_TARGETS_32=Xvnc_install_programs java_install
247N/AINSTALL_TARGETS=$(INSTALL_TARGETS_common) $(INSTALL_TARGETS_$(BUILD_TYPE))
947N/AINSTALL_TARGETS_SET=yes
235N/A
247N/A# Since we only build 64-bit versions of the Xorg servers on SPARC,
947N/A# need to build a 32-bit version of the Xserver mdb module to allow
947N/A# use with Xvnc on SPARC
970N/ABUILD_TARGETS_sparc = build_mdb
970N/ABUILD_TARGETS += $(BUILD_TARGETS_$(MACH))
947N/AINSTALL_TARGETS_sparc = install_mdb
947N/AINSTALL_TARGETS += $(INSTALL_TARGETS_$(MACH))
947N/A
947N/A# Since we only build Xvnc in 32-bit mode, don't need ARCHBINSUBDIR set
947N/A# like in the Xorg builds
947N/AMODULE_BUILD_32_FLAGS = ARCHBINSUBDIR=""
235N/A
241N/Ainclude ../Makefile.inc
493N/A
493N/A# Merge in additional sources from Xorg tarball & sun-src directory
235N/A# This step has to be done before default_source, so that patches applied
1270N/A# in that step work correctly.
1270N/A$(NO_RECURSE)XORG_SOURCE_INIT_TARGET = $(XORG_BUILD_DIR)/$(SOURCE_INIT_TARGET_FILE)
1270N/A$(NO_RECURSE)XORG_PATCHED_TARGET = $(XORG_BUILD_DIR)/$(PATCHED_TARGET_FILE)
1270N/AXvnc_source_init: $(XORG_PATCHED_TARGET)
493N/A
493N/A$(XORG_TARBALL):
1124N/A (cd ../xorg && $(MAKE) $(MAKEFLAGS) download)
963N/A
1124N/A$(XORG_SOURCE_INIT_TARGET): $(XORG_TARBALL)
1124N/A mkdir -p $(SOURCE_DIR)/unix
1097N/A $(MAKE) $(MAKEFLAGS) init_source \
493N/A NO_RECURSE="$(POUND_SIGN)" \
1097N/A BUILD_TYPE="$(BUILD_TYPE)" \
1097N/A SOURCE_TARBALL="$(XORG_TARBALL)" \
493N/A SOURCE_DEPS="$(XORG_TARBALL)" \
235N/A SOURCE_UNCOMPRESS="bzcat" \
1124N/A SOURCE_DIR="$(XORG_BUILD_DIR)" \
1124N/A BUILD_DIR="$(XORG_BUILD_DIR)" \
1124N/A ADD_TAR_FLAGS="--strip-components=1"
1124N/A (cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
1124N/A touch $(XORG_SOURCE_INIT_TARGET)
1124N/A
1124N/A$(XORG_PATCHED_TARGET): $(XORG_SOURCE_INIT_TARGET)
1124N/A $(MAKE) $(MAKEFLAGS) patched_source \
1124N/A NO_RECURSE="$(POUND_SIGN)" \
1124N/A BUILD_TYPE="$(BUILD_TYPE)" \
970N/A SOURCE_PATCHES="$(XORG_SOURCE_PATCHES:%=../xorg/%)" \
970N/A SOURCE_DIR="$(XORG_BUILD_DIR)" \
970N/A XORG_BUILD_DIR="$(XORG_BUILD_DIR)"
1097N/A touch $(XORG_PATCHED_TARGET)
1097N/A
1097N/A# Command line options to GNU autoconf configure script for vnc clients
1030N/AVNC_CONFIG_OPTS= --with-installed-zlib --prefix=/usr \
822N/A --mandir='$${prefix}/share/man' --libdir='$${exec_prefix}/lib/vnc' \
235N/A --localstatedir=/var --with-system-jpeg --without-simd
235N/A
822N/A# Command line options to GNU autoconf configure script for Xvnc
822N/AXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS) \
1422N/A --disable-builddocs --without-int10 \
1422N/A --disable-dga --disable-xfree86-utils --disable-config-hal \
935N/A --disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
935N/A --disable-xwin --disable-xephyr --disable-kdrive
935N/A
935N/A
935N/AMODULE_CPPFLAGS = \
1088N/A -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ \
235N/A -D__extension__=\"\" \
935N/A -I$(PWD)/$(SOURCE_DIR)/common \
963N/A -I$(PWD)/$(SOURCE_DIR)/unix/vncconfig
963N/A
935N/ACFLAGS_gcc += -fPIC
963N/A
1422N/A# Environment variable options to GNU autoconf configure script
1422N/A# Have to remove CFLAGS entries from default LDFLAGS to avoid conflicts
1422N/A# with the C++ compiler we use instead
963N/AVNC_CONFIG_ENV = $(CONFIG_ENV) LIBS="-lsocket -lnsl" \
235N/A LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_LDFLAGS)"
935N/A
935N/AXVNC_CONFIG_ENV = $(CONFIG_ENV) \
963N/A LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(XSERVER_LDFLAGS)"
963N/A
935N/A# Needed by unix/xorg-x11-server-source/hw/vnc/Makefile.am to find libpixman
1422N/A# headers in proto area after solaris-port.patch is applied
1422N/AMODULE_MAKEFLAGS = PROTODIR=$(PROTODIR)
963N/A
1422N/A# Run configure scripts for vnc sources
963N/A$(SOURCE_DIR)/unix/Makefile: $(SOURCE_TARGETS)
235N/A (cd $(SOURCE_DIR)/common && \
493N/A $(AUTORECONF_ENV) autoreconf --install --force && \
1252N/A $(VNC_CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
1252N/A (cd $(SOURCE_DIR)/unix && \
1252N/A $(AUTORECONF_ENV) autoreconf --install --force && \
1252N/A $(VNC_CONFIG_ENV) $(SHELL) ./configure $(VNC_CONFIG_OPTS) )
1252N/A
1252N/A
1252N/A# Run configure script for Xvnc
1252N/A$(XORG_BUILD_DIR)/Makefile: $(SOURCE_TARGETS)
1252N/A (cd $(XORG_BUILD_DIR) && \
1252N/A $(AUTORECONF_ENV) autoreconf --install --force && \
822N/A $(XVNC_CONFIG_ENV) $(SHELL) ./configure $(XVNC_CONFIG_OPTS) )
493N/A
822N/AXvnc_build: $(CONFIGURE_TARGETS)
241N/A (cd $(SOURCE_DIR)/unix ; \
235N/A $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
1351N/A (cd $(XORG_BUILD_DIR) ; \
1351N/A $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
235N/A
493N/AXvnc_install_module: $(BUILD_TARGETS)
235N/A (cd $(XORG_BUILD_DIR)/hw/vnc \
606N/A && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
606N/A CPPROG="cp -p" install)
606N/A
606N/AXvnc_install_programs: $(BUILD_TARGETS)
235N/A mkdir -p $(PROTODIR)/usr/bin/$(ARCHLIBSUBDIR) \
1422N/A $(PROTODIR)/usr/share/man/man1 \
235N/A $(PROTODIR)/var/svc/manifest/application/x11
599N/A $(INSTALL_SCRIPT) -m 0755 $(SOURCE_DIR)/unix/vncserver \
1124N/A $(SOURCE_DIR)/unix/vncpasswd/vncpasswd \
235N/A $(SOURCE_DIR)/unix/vncconfig/vncconfig \
822N/A $(SOURCE_DIR)/unix/vncviewer/vncviewer \
1147N/A $(SOURCE_DIR)/unix/x0vncserver/x0vncserver \
1147N/A $(PROTODIR)/usr/bin/$(ARCHLIBSUBDIR)
1422N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncserver.man \
1422N/A $(PROTODIR)/usr/share/man/man1/vncserver.1
235N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncconfig/vncconfig.man \
1030N/A $(PROTODIR)/usr/share/man/man1/vncconfig.1
1447N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncpasswd/vncpasswd.man \
1097N/A $(PROTODIR)/usr/share/man/man1/vncpasswd.1
822N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncviewer/vncviewer.man \
822N/A $(PROTODIR)/usr/share/man/man1/vncviewer.1
1030N/A $(INSTALL_SCRIPT) -m 0444 \
1422N/A $(SOURCE_DIR)/unix/x0vncserver/x0vncserver.man \
1422N/A $(PROTODIR)/usr/share/man/man1/x0vncserver.1
1422N/A $(INSTALL_SCRIPT) -m 0444 xvnc-inetd.xml \
1422N/A $(PROTODIR)/var/svc/manifest/application/x11/
1422N/A
1019N/A# Java VNCviewer applet for connecting from a web browser
1030N/AJAVA_SOURCE_DIR = $(SOURCE_DIR)/java/src
1030N/AJAVA_INSTALL_DIR = $(PROTODIR)/usr/share/vnc/classes
1030N/AJAVA_JAR_FILE = $(JAVA_SOURCE_DIR)/VncViewer.jar
1030N/A
963N/A# Temporary special handling of Java build fix submitted upstream
235N/AJAVA_MAKEFILE = $(JAVA_SOURCE_DIR)/Makefile
963N/ABUILD_TARGETS += $(JAVA_MAKEFILE)
235N/A
963N/A$(JAVA_MAKEFILE): $(SOURCE_TARGETS)
235N/A cp $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/Makefile $@
963N/A gpatch -d $(SOURCE_DIR) -p0 < applet-build.patch
247N/A gpatch -d $(SOURCE_DIR) -p0 < icon.patch
963N/A cp tigervnc_16.gif $(JAVA_SOURCE_DIR)
963N/A
822N/Ajava_build: $(JAVA_JAR_FILE)
963N/A
980N/A$(JAVA_JAR_FILE): $(SOURCE_TARGETS) $(JAVA_MAKEFILE)
822N/A (cd $(JAVA_SOURCE_DIR) ; \
822N/A $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
822N/A
1422N/Ajava_install: $(JAVA_JAR_FILE)
822N/A -rm -rf $(JAVA_INSTALL_DIR)
822N/A mkdir -p $(JAVA_INSTALL_DIR)
822N/A (cd $(JAVA_SOURCE_DIR) ; \
1422N/A $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
1422N/A install INSTALL_DIR=$(JAVA_INSTALL_DIR))
1422N/A cp -pf $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/README \
822N/A $(JAVA_SOURCE_DIR)/com/tigervnc/vncviewer/LICENCE.TXT \
822N/A $(JAVA_INSTALL_DIR)
822N/A chmod a+x $(JAVA_INSTALL_DIR)/VncViewer.jar
822N/A