Makefile.kmk revision f2d0753897caed541f3318cab1778c67792ca523
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# $Id$
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync## @file
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# available from http://www.virtualbox.org. This file is free software;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# you can redistribute it and/or modify it under the terms of the GNU
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# General Public License (GPL) as published by the Free Software
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# additional information or have any questions.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSUB_DEPTH = ../../../../..
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# VBoxClient - clipboard and seamless.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncPROGRAMS += VBoxClient
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_TEMPLATE = VBOXGUESTR3CPPEXE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncifdef VBOX_WITH_DBUS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VBoxClient_DEFS += VBOX_WITH_DBUS
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncendif
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_DEFS.linux += _GNU_SOURCE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_SOURCES = \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync main.cpp
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_SOURCES += \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync clipboard.cpp
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_LIBPATH = \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(VBOX_LIBPATH32_X11)
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_LIBS.freebsd = \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync iconv
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_LIBS = \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(VBOX_LIB_IPRT_GUEST_R3) \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(VBOX_LIB_VBGL_R3) \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync $(VBOX_LIB_IPRT_GUEST_R3) \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync X11 \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Xt
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# These are static replacements for gcc-specific parts of libstdc++
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncVBoxClient_LIBS += \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync supc++ \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync gcc_eh
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncifdef VBOX_X11_SEAMLESS_GUEST
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VBoxClient_SOURCES += \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync seamless.cpp \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync seamless-host.cpp \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync seamless-x11.cpp \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync thread.cpp \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync display.cpp
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VBoxClient_LIBS += \
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Xext Xmu
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncendif
ifdef VBOX_WITH_GUEST_PROPS
VBoxClient_SOURCES += hostversion.cpp
VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
endif
#
# Link aginst libstdc++.a. (http://www.trilithium.com/johan/2005/06/static-libstdc/).
# (It would've been preferred to avoid features depending on libstdc++, of course...)
#
# Actually, this is darn annoying and will *NOT* be tolerated for any new code!
#
VBoxClient_LIBPATH += $(PATH_VBoxClient)
VBoxClient_ORDERDEPS = $(PATH_VBoxClient)/libstdc++.a
VBoxClient_CLEAN = $(PATH_VBoxClient)/libstdc++.a
$$(PATH_VBoxClient)/libstdc++.a:
$(call MSG_L1,Forcing static libstdc++)
$(QUIET)$(MKDIR) -p $(@D)
$(QUIET)$(LN_EXT) -sf `$(TOOL_$(VBOX_GCC_TOOL)_CXX) $(TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS.$(KBUILD_TARGET_ARCH)) -print-file-name=libstdc++.a` $@ \
|| $(CP_EXT) -f `$(TOOL_$(VBOX_GCC_TOOL)_CXX) $(TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS.$(KBUILD_TARGET_ARCH)) -print-file-name=libstdc++.a` $@
ifdef VBOX_X11_SEAMLESS_GUEST
if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
# to automatically run the unit test at build time.
# OTHERS += $(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto.run
PROGRAMS += tstSeamlessX11-auto
tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
tstSeamlessX11-auto_SOURCES = \
testcase/tstSeamlessX11-auto.cpp \
seamless-x11.cpp
tstSeamlessX11-auto_DEFS = TESTCASE
tstSeamlessX11-auto_LIBS = \
$(LIB_RUNTIME)
TESTING += $(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto
$$(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto.run: \
$$(INSTARGET_tstSeamlessX11-auto)
export VBOX_LOG_DEST=nofile; $(INSTARGET_tstSeamlessX11-auto) quiet
$(QUIET)$(APPEND) -t "$@" "done"
#
# Additional testcase designed to be run manually, which initiates and starts the Linux
# guest client part of the seamless additions in the host, faking seamless events from
# the host and writing information about guest events to standard output.
#
PROGRAMS += tstSeamlessX11
tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
tstSeamlessX11_SOURCES = \
testcase/tstSeamlessX11.cpp \
seamless-host.cpp \
seamless-x11.cpp \
thread.cpp
tstSeamlessX11_LIBPATH = \
$(VBOX_LIBPATH_X11)
tstSeamlessX11_LIBS = \
$(LIB_RUNTIME) \
Xext \
Xmu \
X11
endif
endif
endif
include $(KBUILD_PATH)/subfooter.kmk