Makefile revision 791
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync###############################################################################
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# synergy 1.x Makefile
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Use subject to license terms.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Permission is hereby granted, free of charge, to any person obtaining a
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# copy of this software and associated documentation files (the
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# "Software"), to deal in the Software without restriction, including
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# without limitation the rights to use, copy, modify, merge, publish,
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# distribute, and/or sell copies of the Software, and to permit persons
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# to whom the Software is furnished to do so, provided that the above
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# copyright notice(s) and this permission notice appear in all copies of
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# the Software and that both the above copyright notice(s) and this
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# permission notice appear in supporting documentation.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Except as contained in this notice, the name of a copyright holder
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# shall not be used in advertising or otherwise to promote the sale, use
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# or other dealings in this Software without prior written authorization
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# of the copyright holder.
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# @(#)Makefile 1.1 09/09/17
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync#
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Package name used in tarballs
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncMODULE_NAME=synergy
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Version number (used in path names)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncMODULE_VERSION=1.3.1
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Where to install synergy files
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncMODULE_PREFIX=/usr
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncMODULE_PREFIX_SET=yes
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Source tarball
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSOURCE_TARBALL_NAME=synergy-$(MODULE_VERSION).tar.gz
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSOURCE_TARBALL_NAME_SET=yes
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSOURCE_UNCOMPRESS=gzcat
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSOURCE_UNCOMPRESS_SET=yes
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync# Binaries built in tree
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSYNERGYS_BIN=$(SOURCE_DIR)/cmd/synergys/synergys
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSYNERGYC_BIN=$(SOURCE_DIR)/cmd/synergyc/synergyc
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSYNERGY_DOC=$(SOURCE_DIR)/doc
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncINSTALL_TARGETS=install_synergys install_synergyc install_doc
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncINSTALL_TARGETS_SET=yes
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSOURCE_URL=$(SF_DOWNLOADS_URL)/synergy2/$(SOURCE_TARBALL_NAME)
1b33c96954667ba382fa595baf7b31290bfdd517vboxsyncSOURCE_URL_SET=yes
1b33c96954667ba382fa595baf7b31290bfdd517vboxsync
# Patches to apply to source after unpacking, in order
SOURCE_PATCHES = \
configure.patch \
CConfig.h.patch \
CConfig.cpp.patch \
CKeyMap.cpp.patch \
CKeyState.cpp.patch \
CXWindowsClipboard.cpp.patch \
CXWindowsKeyState.cpp.patch \
CXWindowsScreen.cpp.patch \
CArchConsoleUnix.cpp.patch
# Man pages to apply Sun footer to & attributes to list
#SUNTOUCHED_MANPAGES=man/*.man
SUN_PACKAGE=SUNWsynergy
MODULE_STABILITY=Committed
USE_DEFAULT_CONFIG_ENV=no
MODULE_CXXFLAGS = -m32
MODULE_CXXFLAGS += -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
MODULE_CXXFLAGS += -instances=global -template=geninlinefuncs -verbose=template
MODULE_CXXFLAGS += -xlang=c99 -xbuiltin=%none
MODULE_CXXFLAGS += -Qoption ccfe -features=gcc
MODULE_CXXFLAGS += -Qoption ccfe -features=zla
MODULE_CXXFLAGS += -mt -D_REENTRANT -D__EXTENSIONS__ -D_LARGEFILE_SOURCE
MODULE_CXXFLAGS += -D_FILE_OFFSET_BITS=64
MODULE_CXXFLAGS += -D_XPG5 -D_XOPEN_SOURCE=500
MODULE_CXXFLAGS += -D_POSIX_PTHREAD_SEMANTICS
MODULE_CXXFLAGS += -DPIC -KPIC -DSYSAPI_UNIX=1 -DWINAPI_XWINDOWS=1
MODULE_CPPFLAGS = -DSYSAPI_UNIX=1 \
-DWINAPI_XWINDOWS=1 \
-I$(PROTODIR)$(X11_INCLUDES_DIR) \
-I$(PROTODIR)/usr/include \
-I$(PROTODIR)/usr/include/freetype2
MODULE_LDFLAGS = -L$(PROTODIR)/usr/lib$(ARCHLIBSUBDIR) \
-L$(PROTODIR)$(X11_DIR)/lib$(ARCHLIBSUBDIR) \
-R$(X11_DIR)/lib$(ARCHLIBSUBDIR) \
-KPIC -Bdynamic -lc -lCrun -lCstd -lm \
-lsocket -lnsl -lgen -z combreloc -z ignore
INSTALL = /usr/bin/ginstall -c
MODULE_MAKE=$(GNUMAKE)
MODULE_MAKE_SET=yes
LD_OPTIONS = -lc -lCrun -lCstd -lm -lsocket -lnsl -lgen -z combreloc -z ignore
MODULE_ENV = \
CC="$(CC)" \
CXX="$(CXX)" \
CXXFLAGS="$(MODULE_CXXFLAGS)" \
CPPFLAGS="$(MODULE_CPPFLAGS)" \
CPP="$(CC) -E $(MODULE_CPPFLAGS) $(CPPFLAGS)" \
CXXCPP="$(CXX) -E $(MODULE_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS)" \
LDFLAGS="$(MODULE_LDFLAGS)" \
LD="$(CXX) $(CXXFLAGS) $(LDFLAGS)" \
CXXLD="$(CXX) $(CXXFLAGS) $(LDFLAGS)" \
INSTALL="$(INSTALL)" \
MAKE=$(GNUMAKE) \
GNUMAKE=$(GNUMAKE) \
LD_OPTIONS="$(LD_OPTIONS)"
MODULE_CONFIG_ENV = $(MODULE_ENV)
MODULE_BUILD_ENV = $(CONFIG_ENV)
include ../Makefile.inc
install_gen:: $(INSTALL_TARGETS)
DESTDIR=$(PROTODIR)
install_synergys: $(SYNERGYS_BIN)
mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
cp -pf $(SYNERGYS_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
install_synergyc: $(SYNERGYC_BIN)
mkdir -p $(DESTDIR)$(MODULE_PREFIX)/bin
cp -pf $(SYNERGYC_BIN) $(DESTDIR)$(MODULE_PREFIX)/bin
DOC_AREA=$(DESTDIR)$(MODULE_PREFIX)/share/doc/synergy
# Doc all in html format
install_doc:
mkdir -p $(DOC_AREA)
mkdir -p $(DOC_AREA)/images
cp -pf $(SYNERGY_DOC)/about.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/authors.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/autostart.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/banner.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/border.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/compiling.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/configuration.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/contact.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/developer.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/faq.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/history.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/home.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/index.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/license.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/news.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/roadmap.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/running.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/security.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/tips.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/toc.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/trouble.html $(DOC_AREA)
cp -pf $(SYNERGY_DOC)/images/logo.gif $(DOC_AREA)/images
cp -pf $(SYNERGY_DOC)/images/warp.gif $(DOC_AREA)/images