VirtualBox

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

Last change on this file since 78185 was 78162, checked in by vboxsync, 6 years ago

Shared Clipboard/Additions: Make feature optional (if VBOX_WITH_SHARED_CLIPBOARD is being set).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1# $Id: Makefile.kmk 78162 2019-04-17 14:04:17Z 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
43ifdef VBOX_WITH_SHARED_CLIPBOARD
44 VBoxClient_DEFS += \
45 VBOX_WITH_SHARED_CLIPBOARD
46 VBoxClient_SOURCES += \
47 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
48 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
49 clipboard.cpp
50endif
51
52VBoxClient_SOURCES.linux = \
53 chk_stubs.c
54VBoxClient_LIBPATH = \
55 $(VBOX_LIBPATH32_X11)
56VBoxClient_LIBS.freebsd = \
57 iconv
58VBoxClient_LIBS.linux = \
59 dl
60VBoxClient_LIBS.solaris = \
61 dl
62VBoxClient_LIBS = \
63 X11 Xrandr Xt Xext Xmu
64
65# XXX: -L comes from the template, but not rpath
66VBoxClient_LDFLAGS.netbsd = \
67 -Wl,-rpath /usr/X11R7/lib
68
69ifdef VBOX_WITH_DRAG_AND_DROP
70 ifdef VBOX_DND_WITH_XTEST
71 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
72 VBoxClient_LIBS += \
73 Xtst
74 endif
75endif
76
77# These are static replacements for gcc-specific parts of libstdc++
78VBoxClient_LIBS += \
79 supc++ \
80 gcc_eh
81
82# This forces the memcpy references in the static libraries to go to
83# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
84# how else to do that without recompiling or implementing our own memcpy.
85ifeq ($(KBUILD_TARGET),linux)
86VBoxClient_LDFLAGS.amd64 += \
87 -Wl,--wrap=memcpy
88endif
89
90ifdef VBOX_WITH_GUEST_PROPS
91VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
92endif
93ifdef VBOX_WITH_DRAG_AND_DROP
94VBoxClient_DEFS += \
95 VBOX_WITH_DRAG_AND_DROP \
96 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
97VBoxClient_SOURCES += \
98 draganddrop.cpp
99VBoxClient_LIBS += \
100 $(VBOX_LIB_VBGL_R3) \
101 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
102endif
103
104if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
105 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
106
107# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
108# to automatically run the unit test at build time.
109# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
110
111 PROGRAMS += tstSeamlessX11-auto
112 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
113 tstSeamlessX11-auto_SOURCES = \
114 testcase/tstSeamlessX11-auto.cpp \
115 seamless-x11.cpp
116 tstSeamlessX11-auto_DEFS = TESTCASE
117 tstSeamlessX11-auto_LIBS = \
118 $(LIB_RUNTIME)
119
120 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
121$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
122 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
123 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
124 $(QUIET)$(APPEND) -t "$@" "done"
125
126 #
127 # Additional testcase designed to be run manually, which initiates and starts the Linux
128 # guest client part of the seamless additions in the host, faking seamless events from
129 # the host and writing information about guest events to standard output.
130 #
131 PROGRAMS += tstSeamlessX11
132 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
133 tstSeamlessX11_SOURCES = \
134 testcase/tstSeamlessX11.cpp \
135 seamless.cpp \
136 seamless-x11.cpp
137 tstSeamlessX11_LIBPATH = \
138 $(VBOX_LIBPATH_X11)
139 tstSeamlessX11_LIBS = \
140 $(LIB_RUNTIME) \
141 Xext \
142 Xmu \
143 X11
144 endif
145endif
146
147include $(FILE_KBUILD_SUB_FOOTER)
148
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette