VirtualBox

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

Last change on this file since 98475 was 98416, checked in by vboxsync, 23 months ago

Additions/*.kmk: Automatic scm cleanups. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.2 KB
Line 
1# $Id: Makefile.kmk 98416 2023-02-01 16:25:17Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4#
5
6#
7# Copyright (C) 2006-2023 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28SUB_DEPTH = ../../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31# Use header files from our tree for randr and xinerama. and don't link but rather dlopen libXrand
32# This is mostly because the GA build boxes can have a very old xrandr lib, so instead of linking we dlopen.
33VBOX_WITH_DISTRO_XRAND_XINERAMA =
34
35# We don't yet have a seamless mode compilation flag, so define it here unconditionally.
36VBOX_WITH_SEAMLESS := 1
37
38#
39# VBoxClient - clipboard and seamless.
40#
41PROGRAMS += VBoxClient
42#
43# Please make sure that you grep the source tree and modify all occurences accordingly
44# if you rename the following program name.
45#
46PROGRAMS.linux += VBoxDRMClient
47
48VBoxClient_TEMPLATE = VBoxGuestR3Exe
49VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
50ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
51 VBoxClient_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
52else
53 VBoxClient_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
54endif
55ifdef VBOX_WITH_DBUS
56 VBoxClient_DEFS += VBOX_WITH_DBUS
57endif
58
59VBoxClient_DEFS.linux += _GNU_SOURCE
60VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
61VBoxClient_INCS += ../x11include/panoramiXproto-1.1
62VBoxClient_INCS += ../x11include/libXrandr-1.5.2
63VBoxClient_INCS += ../x11include/randrproto-1.5.0
64VBoxClient_SOURCES = \
65 main.cpp \
66 logging.cpp
67
68VBoxDRMClient_TEMPLATE = VBoxGuestR3Exe
69ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
70 VBoxDRMClient_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
71else
72 VBoxDRMClient_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
73endif
74VBoxDRMClient_SOURCES = \
75 display-drm.cpp \
76 display-ipc.cpp \
77 logging.cpp
78
79
80VBoxClient_SOURCES.linux = \
81 chk_stubs.c
82VBoxClient_LIBPATH = \
83 $(VBOX_LIBPATH32_X11)
84VBoxClient_LIBS.freebsd = \
85 iconv
86VBoxClient_LIBS.linux = \
87 dl
88VBoxClient_LIBS.netbsd = \
89 crypt
90VBoxClient_LIBS.solaris = \
91 dl
92VBoxClient_LIBS = \
93 X11 Xt Xext Xmu
94ifdef VBOX_WITH_DISTRO_XRAND_XINERAMA
95 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA
96 VBoxClient_LIBS += Xrandr
97endif
98
99# XXX: -L comes from the template, but not rpath
100VBoxClient_LDFLAGS.netbsd = \
101 -Wl,-rpath /usr/X11R7/lib
102
103ifdef VBOX_WITH_DRAG_AND_DROP
104 ifdef VBOX_DND_WITH_XTEST
105 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
106 VBoxClient_LIBS += \
107 Xtst
108 endif
109endif
110
111# This forces the memcpy references in the static libraries to go to
112# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
113# how else to do that without recompiling or implementing our own memcpy.
114ifeq ($(KBUILD_TARGET),linux)
115 VBoxClient_LDFLAGS.amd64 += \
116 -Wl,--wrap=memcpy
117endif
118
119ifdef VBOX_WITH_GUEST_PROPS
120 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
121 VBoxClient_SOURCES += \
122 hostversion.cpp
123 VBoxDRMClient_DEFS += VBOX_WITH_GUEST_PROPS
124endif
125
126ifdef VBOX_WITH_DRAG_AND_DROP
127 VBoxClient_DEFS += \
128 VBOX_WITH_DRAG_AND_DROP \
129 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
130 VBoxClient_SOURCES += \
131 draganddrop.cpp
132 VBoxClient_LIBS += \
133 $(VBOX_LIB_VBGL_R3) \
134 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
135endif
136
137ifdef VBOX_WITH_SEAMLESS
138 VBoxClient_DEFS += VBOX_WITH_SEAMLESS
139 VBoxClient_SOURCES += \
140 seamless.cpp \
141 seamless-x11.cpp
142endif
143
144ifdef VBOX_WITH_VMSVGA
145 VBoxClient_DEFS += VBOX_WITH_VMSVGA
146 VBoxClient_SOURCES += \
147 display.cpp \
148 display-svga-x11.cpp \
149 display-svga-xf86cvt.cpp
150 VBoxClient_SOURCES.linux += \
151 display-svga-session.cpp \
152 display-ipc.cpp \
153 display-helper-gnome3.cpp \
154 display-helper-generic.cpp
155
156 ### include $(PATH_SUB_CURRENT)/helpers/Makefile.kmk
157endif
158
159ifdef VBOX_WITH_SHARED_CLIPBOARD
160 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD
161 VBoxClient_SOURCES += \
162 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
163 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
164 clipboard.cpp
165 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
166 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS VBOX_WITH_SHARED_CLIPBOARD_GUEST
167 VBoxClient_SOURCES += \
168 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
169 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
170 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
171 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
172 VBoxClient_SOURCES += \
173 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
174 endif
175 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
176 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
177 # @todo Make this dynamic loading more generic.
178 VBoxClient_SOURCES += \
179 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
180 clipboard-fuse.cpp
181 # @todo Ditto.
182 VBoxClient_INCS += \
183 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
184 endif
185 endif
186endif
187
188if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
189 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
190
191 # Set this in LocalConfig.kmk if you are working on the X11 clipboard service
192 # to automatically run the unit test at build time.
193 # OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
194
195 PROGRAMS += tstSeamlessX11-auto
196 tstSeamlessX11-auto_TEMPLATE = VBoxR3TstExe
197 tstSeamlessX11-auto_SOURCES = \
198 testcase/tstSeamlessX11-auto.cpp \
199 seamless-x11.cpp
200 tstSeamlessX11-auto_DEFS = TESTCASE
201 tstSeamlessX11-auto_LIBS = \
202 $(LIB_RUNTIME)
203
204 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
205 $$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
206 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
207 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
208 $(QUIET)$(APPEND) -t "$@" "done"
209
210 #
211 # Additional testcase designed to be run manually, which initiates and starts the Linux
212 # guest client part of the seamless additions in the host, faking seamless events from
213 # the host and writing information about guest events to standard output.
214 #
215 PROGRAMS += tstSeamlessX11
216 tstSeamlessX11_TEMPLATE = VBoxR3TstExe
217 tstSeamlessX11_SOURCES = \
218 testcase/tstSeamlessX11.cpp \
219 seamless.cpp \
220 seamless-x11.cpp
221 ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
222 tstSeamlessX11_DEFS += VBOX_BUILD_TARGET="$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)"
223 else
224 tstSeamlessX11_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
225 endif
226 tstSeamlessX11_LIBPATH = \
227 $(VBOX_LIBPATH_X11)
228 tstSeamlessX11_LIBS = \
229 $(LIB_RUNTIME) \
230 Xext \
231 Xmu \
232 X11
233 endif
234endif
235
236include $(FILE_KBUILD_SUB_FOOTER)
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