VirtualBox

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

Last change on this file since 85925 was 84547, checked in by vboxsync, 5 years ago

bugref:9637. Renaming display-wayland to display-drm

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