VirtualBox

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

Last change on this file since 83227 was 83227, checked in by vboxsync, 5 years ago

bugref:9637. build fix. yes again

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1# $Id: Makefile.kmk 83227 2020-03-06 18:24:15Z vboxsync $
2## @file
3# Sub-Makefile for the VirtualBox Guest Addition X11 Client.
4#
5
6#
7# Copyright (C) 2006-2020 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# Use header files from our tree for randr and xinerama. and don't link but rather dlopen libXrand
22VBOX_WITH_DISTRO_XRAND_XINERAMA=
23
24#
25# VBoxClient - clipboard and seamless.
26#
27PROGRAMS += VBoxClient
28
29VBoxClient_TEMPLATE = NewVBoxGuestR3Exe
30VBoxClient_DEFS += VBOX_X11_CLIPBOARD VBOX_WITH_HGCM
31VBoxClient_DEFS += VBOX_BUILD_TARGET=\"$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)\"
32ifdef VBOX_WITH_DBUS
33 VBoxClient_DEFS += VBOX_WITH_DBUS
34endif
35ifdef VBOX_WITH_DISTRO_XRAND_XINERAMA
36 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA
37 VBoxClient_LIBS += Xrandr
38endif
39
40
41VBoxClient_DEFS.linux += _GNU_SOURCE
42VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
43VBoxClient_INCS += ../x11include/panoramiXproto-1.1
44VBoxClient_INCS += ../x11include/libXrandr-1.5.2
45VBoxClient_SOURCES = \
46 main.cpp \
47 display-svga.cpp \
48 display-svga-x11.cpp \
49 seamless.cpp \
50 seamless-x11.cpp \
51 hostversion.cpp
52
53VBoxClient_SOURCES.linux = \
54 chk_stubs.c
55VBoxClient_LIBPATH = \
56 $(VBOX_LIBPATH32_X11)
57VBoxClient_LIBS.freebsd = \
58 iconv
59VBoxClient_LIBS.linux = \
60 dl
61VBoxClient_LIBS.netbsd = \
62 crypt
63VBoxClient_LIBS.solaris = \
64 dl
65VBoxClient_LIBS = \
66 X11 Xt Xext Xmu
67# XXX: -L comes from the template, but not rpath
68VBoxClient_LDFLAGS.netbsd = \
69 -Wl,-rpath /usr/X11R7/lib
70
71ifdef VBOX_WITH_DRAG_AND_DROP
72 ifdef VBOX_DND_WITH_XTEST
73 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
74 VBoxClient_LIBS += \
75 Xtst
76 endif
77endif
78
79# This forces the memcpy references in the static libraries to go to
80# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
81# how else to do that without recompiling or implementing our own memcpy.
82ifeq ($(KBUILD_TARGET),linux)
83VBoxClient_LDFLAGS.amd64 += \
84 -Wl,--wrap=memcpy
85endif
86
87ifdef VBOX_WITH_GUEST_PROPS
88VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
89endif
90
91ifdef VBOX_WITH_DRAG_AND_DROP
92VBoxClient_DEFS += \
93 VBOX_WITH_DRAG_AND_DROP \
94 $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
95VBoxClient_SOURCES += \
96 draganddrop.cpp
97VBoxClient_LIBS += \
98 $(VBOX_LIB_VBGL_R3) \
99 $(PATH_STAGE_LIB)/additions/VBoxDnDGuestR3Lib$(VBOX_SUFF_LIB)
100endif
101
102ifdef VBOX_WITH_SHARED_CLIPBOARD
103 VBoxClient_DEFS += \
104 VBOX_WITH_SHARED_CLIPBOARD \
105 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
106 VBoxClient_SOURCES += \
107 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
108 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
109 clipboard.cpp
110 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
111 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_GUEST
112 VBoxClient_SOURCES += \
113 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
114 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
115 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
116 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
117 # @todo Make this dynamic loading more generic.
118 VBoxClient_SOURCES += \
119 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
120 clipboard-fuse.cpp
121 # @todo Ditto.
122 VBoxClient_INCS += \
123 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
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)
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