VirtualBox

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

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

bugref:9637. optional dlopen'ing libXrandr instead of linking. part-2

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