1 | # $Id: Makefile.kmk 78161 2019-04-17 13:52:43Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VirtualBox Guest Addition X11 Client.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2019 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 | #
|
---|
22 | # VBoxClient - clipboard and seamless.
|
---|
23 | #
|
---|
24 | PROGRAMS += VBoxClient
|
---|
25 |
|
---|
26 | VBoxClient_TEMPLATE = NewVBoxGuestR3Exe
|
---|
27 | VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
|
---|
28 | ifdef VBOX_WITH_DBUS
|
---|
29 | VBoxClient_DEFS += VBOX_WITH_DBUS
|
---|
30 | endif
|
---|
31 | VBoxClient_DEFS.linux += _GNU_SOURCE
|
---|
32 | VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
|
---|
33 | VBoxClient_SOURCES = \
|
---|
34 | main.cpp \
|
---|
35 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
|
---|
36 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
|
---|
37 | clipboard.cpp \
|
---|
38 | display-svga.cpp \
|
---|
39 | display-svga-x11.cpp \
|
---|
40 | seamless.cpp \
|
---|
41 | seamless-x11.cpp \
|
---|
42 | display.cpp \
|
---|
43 | hostversion.cpp \
|
---|
44 | check3d.cpp
|
---|
45 | VBoxClient_SOURCES.linux = \
|
---|
46 | chk_stubs.c
|
---|
47 | VBoxClient_LIBPATH = \
|
---|
48 | $(VBOX_LIBPATH32_X11)
|
---|
49 | VBoxClient_LIBS.freebsd = \
|
---|
50 | iconv
|
---|
51 | VBoxClient_LIBS.linux = \
|
---|
52 | dl
|
---|
53 | VBoxClient_LIBS.solaris = \
|
---|
54 | dl
|
---|
55 | VBoxClient_LIBS = \
|
---|
56 | X11 Xrandr Xt Xext Xmu
|
---|
57 |
|
---|
58 | # XXX: -L comes from the template, but not rpath
|
---|
59 | VBoxClient_LDFLAGS.netbsd = \
|
---|
60 | -Wl,-rpath /usr/X11R7/lib
|
---|
61 |
|
---|
62 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
63 | ifdef VBOX_DND_WITH_XTEST
|
---|
64 | VBoxClient_DEFS += VBOX_DND_WITH_XTEST
|
---|
65 | VBoxClient_LIBS += \
|
---|
66 | Xtst
|
---|
67 | endif
|
---|
68 | endif
|
---|
69 |
|
---|
70 | # These are static replacements for gcc-specific parts of libstdc++
|
---|
71 | VBoxClient_LIBS += \
|
---|
72 | supc++ \
|
---|
73 | gcc_eh
|
---|
74 |
|
---|
75 | # This forces the memcpy references in the static libraries to go to
|
---|
76 | # __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
|
---|
77 | # how else to do that without recompiling or implementing our own memcpy.
|
---|
78 | ifeq ($(KBUILD_TARGET),linux)
|
---|
79 | VBoxClient_LDFLAGS.amd64 += \
|
---|
80 | -Wl,--wrap=memcpy
|
---|
81 | endif
|
---|
82 |
|
---|
83 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
84 | VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
|
---|
85 | endif
|
---|
86 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
87 | VBoxClient_DEFS += \
|
---|
88 | VBOX_WITH_DRAG_AND_DROP \
|
---|
89 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
90 | VBoxClient_SOURCES += \
|
---|
91 | draganddrop.cpp
|
---|
92 | VBoxClient_LIBS += \
|
---|
93 | $(VBOX_LIB_VBGL_R3) \
|
---|
94 | $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
|
---|
95 | endif
|
---|
96 |
|
---|
97 | if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
|
---|
98 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
99 |
|
---|
100 | # Set this in LocalConfig.kmk if you are working on the X11 clipboard service
|
---|
101 | # to automatically run the unit test at build time.
|
---|
102 | # OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
|
---|
103 |
|
---|
104 | PROGRAMS += tstSeamlessX11-auto
|
---|
105 | tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
|
---|
106 | tstSeamlessX11-auto_SOURCES = \
|
---|
107 | testcase/tstSeamlessX11-auto.cpp \
|
---|
108 | seamless-x11.cpp
|
---|
109 | tstSeamlessX11-auto_DEFS = TESTCASE
|
---|
110 | tstSeamlessX11-auto_LIBS = \
|
---|
111 | $(LIB_RUNTIME)
|
---|
112 |
|
---|
113 | TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
|
---|
114 | $$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
|
---|
115 | $$(tstSeamlessX11-auto_1_STAGE_TARGET)
|
---|
116 | export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
|
---|
117 | $(QUIET)$(APPEND) -t "$@" "done"
|
---|
118 |
|
---|
119 | #
|
---|
120 | # Additional testcase designed to be run manually, which initiates and starts the Linux
|
---|
121 | # guest client part of the seamless additions in the host, faking seamless events from
|
---|
122 | # the host and writing information about guest events to standard output.
|
---|
123 | #
|
---|
124 | PROGRAMS += tstSeamlessX11
|
---|
125 | tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
|
---|
126 | tstSeamlessX11_SOURCES = \
|
---|
127 | testcase/tstSeamlessX11.cpp \
|
---|
128 | seamless.cpp \
|
---|
129 | seamless-x11.cpp
|
---|
130 | tstSeamlessX11_LIBPATH = \
|
---|
131 | $(VBOX_LIBPATH_X11)
|
---|
132 | tstSeamlessX11_LIBS = \
|
---|
133 | $(LIB_RUNTIME) \
|
---|
134 | Xext \
|
---|
135 | Xmu \
|
---|
136 | X11
|
---|
137 | endif
|
---|
138 | endif
|
---|
139 |
|
---|
140 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
141 |
|
---|