VirtualBox

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

Last change on this file since 86607 was 85977, checked in by vboxsync, 4 years ago

bugref:9637. Reverting unintended space to tab changes in a Makefile.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.6 KB
Line 
1# $Id: Makefile.kmk 85977 2020-09-01 11:39:04Z 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#
25# VBoxClient - clipboard and seamless.
26#
27PROGRAMS += VBoxClient
28#
29# Please make sure that you grep the source tree and modify all occurences accordingly
30# if you rename the following program name.
31#
32PROGRAMS += VBoxDRMClient
33
34VBoxClient_TEMPLATE = NewVBoxGuestR3Exe
35VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
36VBoxClient_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
37ifdef VBOX_WITH_DBUS
38 VBoxClient_DEFS += VBOX_WITH_DBUS
39endif
40
41VBoxClient_DEFS.linux += _GNU_SOURCE
42VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
43VBoxClient_INCS += ../x11include/panoramiXproto-1.1
44VBoxClient_INCS += ../x11include/libXrandr-1.5.2
45VBoxClient_INCS += ../x11include/randrproto-1.6.0
46VBoxClient_SOURCES = \
47 main.cpp \
48 display-svga-x11.cpp \
49 seamless.cpp \
50 seamless-x11.cpp \
51 logging.cpp \
52 hostversion.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)
96VBoxClient_LDFLAGS.amd64 += \
97 -Wl,--wrap=memcpy
98endif
99
100ifdef VBOX_WITH_GUEST_PROPS
101VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
102endif
103
104ifdef VBOX_WITH_DRAG_AND_DROP
105VBoxClient_DEFS += \
106 VBOX_WITH_DRAG_AND_DROP \
107 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
108VBoxClient_SOURCES += \
109 draganddrop.cpp
110VBoxClient_LIBS += \
111 $(VBOX_LIB_VBGL_R3) \
112 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
113endif
114
115ifdef VBOX_WITH_SHARED_CLIPBOARD
116 VBoxClient_DEFS += \
117 VBOX_WITH_SHARED_CLIPBOARD \
118 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
119 VBoxClient_SOURCES += \
120 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
121 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
122 clipboard.cpp
123 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
124 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_GUEST
125 VBoxClient_SOURCES += \
126 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
127 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
128 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
129 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
130 # @todo Make this dynamic loading more generic.
131 VBoxClient_SOURCES += \
132 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
133 clipboard-fuse.cpp
134 # @todo Ditto.
135 VBoxClient_INCS += \
136 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
137 endif
138 endif
139endif
140
141if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
142 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
143
144# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
145# to automatically run the unit test at build time.
146# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
147
148 PROGRAMS += tstSeamlessX11-auto
149 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
150 tstSeamlessX11-auto_SOURCES = \
151 testcase/tstSeamlessX11-auto.cpp \
152 seamless-x11.cpp
153 tstSeamlessX11-auto_DEFS = TESTCASE
154 tstSeamlessX11-auto_LIBS = \
155 $(LIB_RUNTIME)
156
157 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
158$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
159 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
160 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
161 $(QUIET)$(APPEND) -t "$@" "done"
162
163 #
164 # Additional testcase designed to be run manually, which initiates and starts the Linux
165 # guest client part of the seamless additions in the host, faking seamless events from
166 # the host and writing information about guest events to standard output.
167 #
168 PROGRAMS += tstSeamlessX11
169 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
170 tstSeamlessX11_SOURCES = \
171 testcase/tstSeamlessX11.cpp \
172 seamless.cpp \
173 seamless-x11.cpp
174 tstSeamlessX11_LIBPATH = \
175 $(VBOX_LIBPATH_X11)
176 tstSeamlessX11_LIBS = \
177 $(LIB_RUNTIME) \
178 Xext \
179 Xmu \
180 X11
181 endif
182endif
183
184include $(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