VirtualBox

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

Last change on this file since 94876 was 94306, checked in by vboxsync, 3 years ago

Additions: X11: partly restore legacy X11 resize service removed in r136358, bugref:10199.

In this commit, lagacy X11 resize service 'VBoxClient --display' is restored. This service
will be started as a fallback if 'VBoxClient --vmsvga' service will fail to start. This commit
restores guest screen resize functionality for old X11 guests (currently only Linux) which have
libXrandr older than 1.4 installed in the system.

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

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