VirtualBox

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

Last change on this file since 86968 was 86871, checked in by vboxsync, 4 years ago

Additions/VBoxClient: Big revamp of the internal service handling and termination fixes. A service now runs as part of a worker thread, while the main thread is used for initialization / shutdown and signal handling.

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