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