VirtualBox

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

Last change on this file since 87758 was 87685, checked in by vboxsync, 4 years ago

Shared Clipboard/Transfers: Makefile tweaking for VBoxClient. ​bugref:9437

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.2 KB
Line 
1# $Id: Makefile.kmk 87685 2021-02-10 13:13:31Z 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 += VBOX_WITH_SHARED_CLIPBOARD
131 VBoxClient_SOURCES += \
132 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
133 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
134 clipboard.cpp
135 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
136 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS VBOX_WITH_SHARED_CLIPBOARD_GUEST
137 VBoxClient_SOURCES += \
138 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
139 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
140 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
141 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS_HTTP
142 VBoxClient_SOURCES += \
143 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-http.cpp
144 endif
145 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
146 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
147 # @todo Make this dynamic loading more generic.
148 VBoxClient_SOURCES += \
149 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
150 clipboard-fuse.cpp
151 # @todo Ditto.
152 VBoxClient_INCS += \
153 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
154 endif
155 endif
156endif
157
158if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
159 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
160
161# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
162# to automatically run the unit test at build time.
163# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
164
165 PROGRAMS += tstSeamlessX11-auto
166 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
167 tstSeamlessX11-auto_SOURCES = \
168 testcase/tstSeamlessX11-auto.cpp \
169 seamless-x11.cpp
170 tstSeamlessX11-auto_DEFS = TESTCASE
171 tstSeamlessX11-auto_LIBS = \
172 $(LIB_RUNTIME)
173
174 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
175$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
176 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
177 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
178 $(QUIET)$(APPEND) -t "$@" "done"
179
180 #
181 # Additional testcase designed to be run manually, which initiates and starts the Linux
182 # guest client part of the seamless additions in the host, faking seamless events from
183 # the host and writing information about guest events to standard output.
184 #
185 PROGRAMS += tstSeamlessX11
186 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
187 tstSeamlessX11_SOURCES = \
188 testcase/tstSeamlessX11.cpp \
189 seamless.cpp \
190 seamless-x11.cpp
191 tstSeamlessX11_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
192 tstSeamlessX11_LIBPATH = \
193 $(VBOX_LIBPATH_X11)
194 tstSeamlessX11_LIBS = \
195 $(LIB_RUNTIME) \
196 Xext \
197 Xmu \
198 X11
199 endif
200endif
201
202include $(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