VirtualBox

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

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

FE/Qt: bugref:9637. Some additional comments.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.3 KB
Line 
1# $Id: Makefile.kmk 91758 2021-10-15 10:29:15Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4#
5
6#
7# Copyright (C) 2006-2020 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 += 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 logging.cpp
59
60
61VBoxClient_SOURCES.linux = \
62 chk_stubs.c
63VBoxClient_LIBPATH = \
64 $(VBOX_LIBPATH32_X11)
65VBoxClient_LIBS.freebsd = \
66 iconv
67VBoxClient_LIBS.linux = \
68 dl
69VBoxClient_LIBS.netbsd = \
70 crypt
71VBoxClient_LIBS.solaris = \
72 dl
73VBoxClient_LIBS = \
74 X11 Xt Xext Xmu
75ifdef VBOX_WITH_DISTRO_XRAND_XINERAMA
76 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA
77 VBoxClient_LIBS += Xrandr
78endif
79
80# XXX: -L comes from the template, but not rpath
81VBoxClient_LDFLAGS.netbsd = \
82 -Wl,-rpath /usr/X11R7/lib
83
84ifdef VBOX_WITH_DRAG_AND_DROP
85 ifdef VBOX_DND_WITH_XTEST
86 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
87 VBoxClient_LIBS += \
88 Xtst
89 endif
90endif
91
92# This forces the memcpy references in the static libraries to go to
93# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
94# how else to do that without recompiling or implementing our own memcpy.
95ifeq ($(KBUILD_TARGET),linux)
96 VBoxClient_LDFLAGS.amd64 += \
97 -Wl,--wrap=memcpy
98endif
99
100ifdef VBOX_WITH_GUEST_PROPS
101 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
102 VBoxClient_SOURCES += \
103 hostversion.cpp
104endif
105
106ifdef VBOX_WITH_DRAG_AND_DROP
107 VBoxClient_DEFS += \
108 VBOX_WITH_DRAG_AND_DROP \
109 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
110 VBoxClient_SOURCES += \
111 draganddrop.cpp
112 VBoxClient_LIBS += \
113 $(VBOX_LIB_VBGL_R3) \
114 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
115endif
116
117ifdef VBOX_WITH_SEAMLESS
118 VBoxClient_DEFS += VBOX_WITH_SEAMLESS
119 VBoxClient_SOURCES += \
120 seamless.cpp \
121 seamless-x11.cpp
122endif
123
124ifdef VBOX_WITH_VMSVGA
125 VBoxClient_DEFS += VBOX_WITH_VMSVGA
126 VBoxClient_SOURCES += \
127 display-svga-x11.cpp
128endif
129
130ifdef VBOX_WITH_SHARED_CLIPBOARD
131 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD
132 VBoxClient_SOURCES += \
133 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
134 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
135 clipboard.cpp
136 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
137 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS VBOX_WITH_SHARED_CLIPBOARD_GUEST
138 VBoxClient_SOURCES += \
139 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
140 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
141 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
142 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
143 VBoxClient_SOURCES += \
144 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
145 endif
146 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
147 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
148 # @todo Make this dynamic loading more generic.
149 VBoxClient_SOURCES += \
150 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
151 clipboard-fuse.cpp
152 # @todo Ditto.
153 VBoxClient_INCS += \
154 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
155 endif
156 endif
157endif
158
159if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
160 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
161
162# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
163# to automatically run the unit test at build time.
164# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
165
166 PROGRAMS += tstSeamlessX11-auto
167 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
168 tstSeamlessX11-auto_SOURCES = \
169 testcase/tstSeamlessX11-auto.cpp \
170 seamless-x11.cpp
171 tstSeamlessX11-auto_DEFS = TESTCASE
172 tstSeamlessX11-auto_LIBS = \
173 $(LIB_RUNTIME)
174
175 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
176$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
177 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
178 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
179 $(QUIET)$(APPEND) -t "$@" "done"
180
181 #
182 # Additional testcase designed to be run manually, which initiates and starts the Linux
183 # guest client part of the seamless additions in the host, faking seamless events from
184 # the host and writing information about guest events to standard output.
185 #
186 PROGRAMS += tstSeamlessX11
187 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
188 tstSeamlessX11_SOURCES = \
189 testcase/tstSeamlessX11.cpp \
190 seamless.cpp \
191 seamless-x11.cpp
192 tstSeamlessX11_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
193 tstSeamlessX11_LIBPATH = \
194 $(VBOX_LIBPATH_X11)
195 tstSeamlessX11_LIBS = \
196 $(LIB_RUNTIME) \
197 Xext \
198 Xmu \
199 X11
200 endif
201endif
202
203include $(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