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