VirtualBox

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

Last change on this file since 78416 was 78307, checked in by vboxsync, 6 years ago

Shared Clipboard/URI: First commit; work in progress.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1# $Id: Makefile.kmk 78307 2019-04-26 06:41:46Z 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
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# VBoxClient - clipboard and seamless.
23#
24PROGRAMS += VBoxClient
25
26VBoxClient_TEMPLATE = NewVBoxGuestR3Exe
27VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
28ifdef VBOX_WITH_DBUS
29 VBoxClient_DEFS += VBOX_WITH_DBUS
30endif
31VBoxClient_DEFS.linux += _GNU_SOURCE
32VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
33VBoxClient_SOURCES = \
34 main.cpp \
35 display-svga.cpp \
36 display-svga-x11.cpp \
37 seamless.cpp \
38 seamless-x11.cpp \
39 display.cpp \
40 hostversion.cpp \
41 check3d.cpp
42
43VBoxClient_SOURCES.linux = \
44 chk_stubs.c
45VBoxClient_LIBPATH = \
46 $(VBOX_LIBPATH32_X11)
47VBoxClient_LIBS.freebsd = \
48 iconv
49VBoxClient_LIBS.linux = \
50 dl
51VBoxClient_LIBS.solaris = \
52 dl
53VBoxClient_LIBS = \
54 X11 Xrandr Xt Xext Xmu
55
56# XXX: -L comes from the template, but not rpath
57VBoxClient_LDFLAGS.netbsd = \
58 -Wl,-rpath /usr/X11R7/lib
59
60ifdef VBOX_WITH_DRAG_AND_DROP
61 ifdef VBOX_DND_WITH_XTEST
62 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
63 VBoxClient_LIBS += \
64 Xtst
65 endif
66endif
67
68# These are static replacements for gcc-specific parts of libstdc++
69VBoxClient_LIBS += \
70 supc++ \
71 gcc_eh
72
73# This forces the memcpy references in the static libraries to go to
74# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
75# how else to do that without recompiling or implementing our own memcpy.
76ifeq ($(KBUILD_TARGET),linux)
77VBoxClient_LDFLAGS.amd64 += \
78 -Wl,--wrap=memcpy
79endif
80
81ifdef VBOX_WITH_GUEST_PROPS
82VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
83endif
84
85ifdef VBOX_WITH_DRAG_AND_DROP
86VBoxClient_DEFS += \
87 VBOX_WITH_DRAG_AND_DROP \
88 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
89VBoxClient_SOURCES += \
90 draganddrop.cpp
91VBoxClient_LIBS += \
92 $(VBOX_LIB_VBGL_R3) \
93 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
94endif
95
96ifdef VBOX_WITH_SHARED_CLIPBOARD
97 VBoxClient_DEFS += \
98 VBOX_WITH_SHARED_CLIPBOARD \
99 $(if $(VBOX_WITH_SHARED_CLIPBOARD_URI_LIST),VBOX_WITH_SHARED_CLIPBOARD_URI_LIST,)
100 VBoxClient_SOURCES += \
101 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
102 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
103 clipboard.cpp
104 ifdef VBOX_WITH_SHARED_CLIPBOARD_URI_LIST
105 ifdef VBOX_WITH_LIBFUSE
106 VBoxClient_SOURCES += \
107 clipboard-fuse.cpp
108 VBoxClient_LIBS += \
109 libfuse
110 endif
111 ifdef VBOX_WITH_LIBGVFS
112 VBoxClient_SOURCES += \
113 clipboard-gvfs.c
114 VBOX_VBOXCLIENT_GVFS_VER:=1.31.92
115 VBoxClient_INCS += \
116 gvfs-$(VBOX_VBOXCLIENT_GVFS_VER)/common \
117 gvfs-$(VBOX_VBOXCLIENT_GVFS_VER)/client \
118 gvfs-$(VBOX_VBOXCLIENT_GVFS_VER)/daemon \
119 /usr/lib/x86_64-linux-gnu/glib-2.0/include \
120 /usr/include/glib-2.0
121 VBoxClient_LIBS += \
122 libgio-2.0 \
123 libglib-2.0
124 endif
125 endif
126endif
127
128if 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
169endif
170
171include $(FILE_KBUILD_SUB_FOOTER)
172
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