VirtualBox

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

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

Additions/Linux: always build Additions complatible with old distributions.
bugref:9112: Linux Additions: fix building binaries for older Linux user space
A second attempt at making our Linux Additions binaries work with old versions
of glibc without any special configuration settings, now that the build
problem on EL5 is fixed.

  • 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 72114 2018-05-04 16:00:01Z 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
70# This has to be in LIBS, so as to be linked in after supc++ and gcc_eh, which
71# depend on the symbols it provides. Static supc++ and gcc_eh on at least
72# Ubuntu 17.04 contain references to __sprintf_chk and __stack_chk_fail.
73# Furthermore, they contain references to memcpy, which needs to be resolved
74# to memcpy@GLIBC_2.2.5, which we solve in a not-very-satisfactory way with a
75# wrapper.
76ifeq ($(KBUILD_TARGET),linux)
77VBoxClient_LIBS += \
78 $(PATH_ROOT)/src/VBox/Additions/x11/VBoxClient/chk_stubs.c
79VBoxClient_LDFLAGS.amd64 += \
80 -Wl,--wrap=memcpy
81endif
82
83ifdef VBOX_X11_SEAMLESS_GUEST
84 VBoxClient_DEFS += SEAMLESS_GUEST DYNAMIC_RESIZE
85 VBoxClient_SOURCES += \
86 seamless.cpp \
87 seamless-x11.cpp \
88 display.cpp \
89 hostversion.cpp \
90 check3d.cpp
91 VBoxClient_LIBS += \
92 Xext Xmu
93endif
94ifdef VBOX_WITH_GUEST_PROPS
95 VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
96endif
97ifdef VBOX_WITH_DRAG_AND_DROP
98 VBoxClient_DEFS += \
99 VBOX_WITH_DRAG_AND_DROP \
100 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
101 VBoxClient_SOURCES += \
102 draganddrop.cpp
103 VBoxClient_LIBS += \
104 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
105endif
106
107ifdef VBOX_X11_SEAMLESS_GUEST
108 if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
109 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
110
111# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
112# to automatically run the unit test at build time.
113# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
114
115 PROGRAMS += tstSeamlessX11-auto
116 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
117 tstSeamlessX11-auto_SOURCES = \
118 testcase/tstSeamlessX11-auto.cpp \
119 seamless-x11.cpp
120 tstSeamlessX11-auto_DEFS = TESTCASE
121 tstSeamlessX11-auto_LIBS = \
122 $(LIB_RUNTIME)
123
124 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
125$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
126 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
127 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
128 $(QUIET)$(APPEND) -t "$@" "done"
129
130 #
131 # Additional testcase designed to be run manually, which initiates and starts the Linux
132 # guest client part of the seamless additions in the host, faking seamless events from
133 # the host and writing information about guest events to standard output.
134 #
135 PROGRAMS += tstSeamlessX11
136 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
137 tstSeamlessX11_SOURCES = \
138 testcase/tstSeamlessX11.cpp \
139 seamless.cpp \
140 seamless-x11.cpp
141 tstSeamlessX11_LIBPATH = \
142 $(VBOX_LIBPATH_X11)
143 tstSeamlessX11_LIBS = \
144 $(LIB_RUNTIME) \
145 Xext \
146 Xmu \
147 X11
148 endif
149 endif
150endif
151
152include $(FILE_KBUILD_SUB_FOOTER)
153
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