VirtualBox

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

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

bugref:9637. small fixes

  • 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 83234 2020-03-09 08:10:44Z 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
35
36VBoxClient_DEFS.linux += _GNU_SOURCE
37VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
38VBoxClient_INCS += ../x11include/panoramiXproto-1.1
39VBoxClient_INCS += ../x11include/libXrandr-1.5.2
40VBoxClient_INCS += ../x11include/randrproto-1.6.0
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
64 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA
65 VBoxClient_LIBS += Xrandr
66endif
67
68# XXX: -L comes from the template, but not rpath
69VBoxClient_LDFLAGS.netbsd = \
70 -Wl,-rpath /usr/X11R7/lib
71
72ifdef VBOX_WITH_DRAG_AND_DROP
73 ifdef VBOX_DND_WITH_XTEST
74 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
75 VBoxClient_LIBS += \
76 Xtst
77 endif
78endif
79
80# This forces the memcpy references in the static libraries to go to
81# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
82# how else to do that without recompiling or implementing our own memcpy.
83ifeq ($(KBUILD_TARGET),linux)
84VBoxClient_LDFLAGS.amd64 += \
85 -Wl,--wrap=memcpy
86endif
87
88ifdef VBOX_WITH_GUEST_PROPS
89VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
90endif
91
92ifdef VBOX_WITH_DRAG_AND_DROP
93VBoxClient_DEFS += \
94 VBOX_WITH_DRAG_AND_DROP \
95 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
96VBoxClient_SOURCES += \
97 draganddrop.cpp
98VBoxClient_LIBS += \
99 $(VBOX_LIB_VBGL_R3) \
100 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
101endif
102
103ifdef VBOX_WITH_SHARED_CLIPBOARD
104 VBoxClient_DEFS += \
105 VBOX_WITH_SHARED_CLIPBOARD \
106 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
107 VBoxClient_SOURCES += \
108 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
109 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
110 clipboard.cpp
111 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
112 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_GUEST
113 VBoxClient_SOURCES += \
114 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
115 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
116 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
117 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
118 # @todo Make this dynamic loading more generic.
119 VBoxClient_SOURCES += \
120 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
121 clipboard-fuse.cpp
122 # @todo Ditto.
123 VBoxClient_INCS += \
124 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
125 endif
126 endif
127endif
128
129if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
130 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
131
132# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
133# to automatically run the unit test at build time.
134# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
135
136 PROGRAMS += tstSeamlessX11-auto
137 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
138 tstSeamlessX11-auto_SOURCES = \
139 testcase/tstSeamlessX11-auto.cpp \
140 seamless-x11.cpp
141 tstSeamlessX11-auto_DEFS = TESTCASE
142 tstSeamlessX11-auto_LIBS = \
143 $(LIB_RUNTIME)
144
145 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
146$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
147 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
148 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
149 $(QUIET)$(APPEND) -t "$@" "done"
150
151 #
152 # Additional testcase designed to be run manually, which initiates and starts the Linux
153 # guest client part of the seamless additions in the host, faking seamless events from
154 # the host and writing information about guest events to standard output.
155 #
156 PROGRAMS += tstSeamlessX11
157 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
158 tstSeamlessX11_SOURCES = \
159 testcase/tstSeamlessX11.cpp \
160 seamless.cpp \
161 seamless-x11.cpp
162 tstSeamlessX11_LIBPATH = \
163 $(VBOX_LIBPATH_X11)
164 tstSeamlessX11_LIBS = \
165 $(LIB_RUNTIME) \
166 Xext \
167 Xmu \
168 X11
169 endif
170endif
171
172include $(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