VirtualBox

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

Last change on this file since 71881 was 71708, checked in by vboxsync, 7 years ago

Revert r121784 and 121788: bugref:9112: Linux Additions: fix building binaries for older Linux user space

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1# $Id: Makefile.kmk 71708 2018-04-06 15:11:22Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4#
5
6#
7# Copyright (C) 2006-2017 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
35VBoxClient_SOURCES += \
36 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-helper.cpp \
37 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp \
38 clipboard.cpp \
39 display-svga.cpp \
40 display-svga-x11.cpp
41VBoxClient_LIBPATH = \
42 $(VBOX_LIBPATH32_X11)
43VBoxClient_LIBS.freebsd = \
44 iconv
45VBoxClient_LIBS.linux = \
46 dl
47VBoxClient_LIBS.solaris = \
48 dl
49VBoxClient_LIBS = \
50 X11 \
51 Xrandr \
52 Xt
53
54# XXX: -L comes from the template, but not rpath
55VBoxClient_LDFLAGS.netbsd = \
56 -Wl,-rpath /usr/X11R7/lib
57
58ifdef VBOX_WITH_DRAG_AND_DROP
59 ifdef VBOX_DND_WITH_XTEST
60 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
61 VBoxClient_LIBS += \
62 Xtst
63 endif
64endif
65
66# These are static replacements for gcc-specific parts of libstdc++
67VBoxClient_LIBS += \
68 supc++ \
69 gcc_eh
70ifdef VBOX_WITH_OLD_GLIBC_SUPPORT
71 # This has to be in LIBS, so as to be linked in after supc++ and gcc_eh, which
72 # depend on the symbols it provides. Static supc++ and gcc_eh on at least
73 # Ubuntu 17.04 contain references to __sprintf_chk and __stack_chk_fail.
74 # Furthermore, they contain references to memcpy, which needs to be resolved
75 # to memcpy@GLIBC_2.2.5, which we solve in a not-very-satisfactory way with a
76 # wrapper.
77 ifeq ($(KBUILD_TARGET),linux)
78VBoxClient_LIBS += \
79 $(PATH_ROOT)/src/VBox/Additions/x11/VBoxClient/chk_stubs.c
80VBoxClient_LDFLAGS.amd64 += \
81 -Wl,--wrap=memcpy
82 endif
83endif
84
85ifdef VBOX_X11_SEAMLESS_GUEST
86 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
87 VBoxClient_SOURCES += \
88 seamless.cpp \
89 seamless-x11.cpp \
90 display.cpp \
91 hostversion.cpp \
92 check3d.cpp
93 VBoxClient_LIBS += \
94 Xext Xmu
95endif
96ifdef VBOX_WITH_GUEST_PROPS
97 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
98endif
99ifdef VBOX_WITH_DRAG_AND_DROP
100 VBoxClient_DEFS += \
101 VBOX_WITH_DRAG_AND_DROP \
102 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
103 VBoxClient_SOURCES += \
104 draganddrop.cpp
105 VBoxClient_LIBS += \
106 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
107endif
108
109ifdef VBOX_X11_SEAMLESS_GUEST
110 if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
111 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
112
113# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
114# to automatically run the unit test at build time.
115# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
116
117 PROGRAMS += tstSeamlessX11-auto
118 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
119 tstSeamlessX11-auto_SOURCES = \
120 testcase/tstSeamlessX11-auto.cpp \
121 seamless-x11.cpp
122 tstSeamlessX11-auto_DEFS = TESTCASE
123 tstSeamlessX11-auto_LIBS = \
124 $(LIB_RUNTIME)
125
126 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
127$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
128 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
129 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
130 $(QUIET)$(APPEND) -t "$@" "done"
131
132 #
133 # Additional testcase designed to be run manually, which initiates and starts the Linux
134 # guest client part of the seamless additions in the host, faking seamless events from
135 # the host and writing information about guest events to standard output.
136 #
137 PROGRAMS += tstSeamlessX11
138 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
139 tstSeamlessX11_SOURCES = \
140 testcase/tstSeamlessX11.cpp \
141 seamless.cpp \
142 seamless-x11.cpp
143 tstSeamlessX11_LIBPATH = \
144 $(VBOX_LIBPATH_X11)
145 tstSeamlessX11_LIBS = \
146 $(LIB_RUNTIME) \
147 Xext \
148 Xmu \
149 X11
150 endif
151 endif
152endif
153
154include $(FILE_KBUILD_SUB_FOOTER)
155
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