VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/VBoxClient/Makefile.kmk@ 25873

Last change on this file since 25873 was 25473, checked in by vboxsync, 15 years ago

Additions/VBoxClient: libdl does not exist on FreeBSD. Add it only for Linux and Solaris

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
Line 
1# $Id: Makefile.kmk 25473 2009-12-17 21:49:27Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4#
5
6#
7# Copyright (C) 2006-2007 Sun Microsystems, Inc.
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25#
26# VBoxClient - clipboard and seamless.
27#
28PROGRAMS += VBoxClient
29
30VBoxClient_TEMPLATE = VBOXGUESTR3CPPEXE
31VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
32ifdef VBOX_WITH_DBUS
33 VBoxClient_DEFS += VBOX_WITH_DBUS
34endif
35VBoxClient_DEFS.linux += _GNU_SOURCE
36VBoxClient_SOURCES = \
37 main.cpp
38VBoxClient_SOURCES += \
39 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp \
40 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp \
41 clipboard.cpp
42VBoxClient_LIBPATH = \
43 $(VBOX_LIBPATH32_X11)
44VBoxClient_LIBS.freebsd = \
45 iconv
46VBoxClient_LIBS.linux = \
47 dl
48VBoxClient_LIBS.solaris = \
49 dl
50VBoxClient_LIBS = \
51 $(VBOX_LIB_IPRT_GUEST_R3) \
52 $(VBOX_LIB_VBGL_R3) \
53 $(VBOX_LIB_IPRT_GUEST_R3) \
54 X11 \
55 Xt
56# These are static replacements for gcc-specific parts of libstdc++
57VBoxClient_LIBS += \
58 supc++ \
59 gcc_eh
60ifdef VBOX_X11_SEAMLESS_GUEST
61 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
62 VBoxClient_SOURCES += \
63 seamless.cpp \
64 seamless-host.cpp \
65 seamless-x11.cpp \
66 thread.cpp \
67 display.cpp \
68 hostversion.cpp
69 VBoxClient_LIBS += \
70 Xext Xmu
71endif
72ifdef VBOX_WITH_GUEST_PROPS
73 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
74endif
75#
76# Link aginst libstdc++.a. (http://www.trilithium.com/johan/2005/06/static-libstdc/).
77# (It would've been preferred to avoid features depending on libstdc++, of course...)
78#
79# Actually, this is darn annoying and will *NOT* be tolerated for any new code!
80#
81VBoxClient_LIBPATH += $(PATH_VBoxClient)
82VBoxClient_ORDERDEPS = $(PATH_VBoxClient)/libstdc++.a
83VBoxClient_CLEAN = $(PATH_VBoxClient)/libstdc++.a
84$$(PATH_VBoxClient)/libstdc++.a:
85 $(call MSG_L1,Forcing static libstdc++)
86 $(QUIET)$(MKDIR) -p $(@D)
87 $(QUIET)$(LN_EXT) -sf `$(TOOL_$(VBOX_GCC_TOOL)_CXX) $(TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS.$(KBUILD_TARGET_ARCH)) -print-file-name=libstdc++.a` $@ \
88 || $(CP_EXT) -f `$(TOOL_$(VBOX_GCC_TOOL)_CXX) $(TEMPLATE_VBOXGUESTR3CPPEXE_CXXFLAGS.$(KBUILD_TARGET_ARCH)) -print-file-name=libstdc++.a` $@
89
90ifdef VBOX_X11_SEAMLESS_GUEST
91 if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
92 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
93
94# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
95# to automatically run the unit test at build time.
96# OTHERS += $(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto.run
97
98 PROGRAMS += tstSeamlessX11-auto
99 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
100 tstSeamlessX11-auto_SOURCES = \
101 testcase/tstSeamlessX11-auto.cpp \
102 seamless-x11.cpp
103 tstSeamlessX11-auto_DEFS = TESTCASE
104 tstSeamlessX11-auto_LIBS = \
105 $(LIB_RUNTIME)
106
107 TESTING += $(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto
108$$(PATH_tstSeamlessX11-auto)/tstSeamlessX11-auto.run: \
109 $$(INSTARGET_tstSeamlessX11-auto)
110 export VBOX_LOG_DEST=nofile; $(INSTARGET_tstSeamlessX11-auto) quiet
111 $(QUIET)$(APPEND) -t "$@" "done"
112
113 #
114 # Additional testcase designed to be run manually, which initiates and starts the Linux
115 # guest client part of the seamless additions in the host, faking seamless events from
116 # the host and writing information about guest events to standard output.
117 #
118 PROGRAMS += tstSeamlessX11
119 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
120 tstSeamlessX11_SOURCES = \
121 testcase/tstSeamlessX11.cpp \
122 seamless-host.cpp \
123 seamless-x11.cpp \
124 thread.cpp
125 tstSeamlessX11_LIBPATH = \
126 $(VBOX_LIBPATH_X11)
127 tstSeamlessX11_LIBS = \
128 $(LIB_RUNTIME) \
129 Xext \
130 Xmu \
131 X11
132 endif
133 endif
134endif
135
136include $(KBUILD_PATH)/subfooter.kmk
137
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette