VirtualBox

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

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

bugref:9637. Splitting logging logging related functions from main.cpp

  • 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 84501 2020-05-25 13:36:55Z 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
35
36VBoxClient_DEFS.linux += _GNU_SOURCE
37VBoxClient_INCS = $(VBOX_GRAPHICS_INCS)
38VBoxClient_INCS += ../x11include/panoramiXproto-1.1
39VBoxClient_INCS += ../x11include/libXrandr-1.5.2
40VBoxClient_INCS += ../x11include/randrproto-1.6.0
41VBoxClient_SOURCES = \
42 main.cpp \
43 display-svga.cpp \
44 display-svga-x11.cpp \
45 seamless.cpp \
46 seamless-x11.cpp \
47 logging.cpp \
48 hostversion.cpp
49
50VBoxClient_SOURCES.linux = \
51 chk_stubs.c
52VBoxClient_LIBPATH = \
53 $(VBOX_LIBPATH32_X11)
54VBoxClient_LIBS.freebsd = \
55 iconv
56VBoxClient_LIBS.linux = \
57 dl
58VBoxClient_LIBS.netbsd = \
59 crypt
60VBoxClient_LIBS.solaris = \
61 dl
62VBoxClient_LIBS = \
63 X11 Xt Xext Xmu
64ifdef VBOX_WITH_DISTRO_XRAND_XINERAMA
65 VBoxClient_DEFS += WITH_DISTRO_XRAND_XINERAMA
66 VBoxClient_LIBS += Xrandr
67endif
68
69# XXX: -L comes from the template, but not rpath
70VBoxClient_LDFLAGS.netbsd = \
71 -Wl,-rpath /usr/X11R7/lib
72
73ifdef VBOX_WITH_DRAG_AND_DROP
74 ifdef VBOX_DND_WITH_XTEST
75 VBoxClient_DEFS += VBOX_DND_WITH_XTEST
76 VBoxClient_LIBS += \
77 Xtst
78 endif
79endif
80
81# This forces the memcpy references in the static libraries to go to
82# __wrap_memcpy, which we can wrap around memcpy@GLIBC_2.2.5. I do not know
83# how else to do that without recompiling or implementing our own memcpy.
84ifeq ($(KBUILD_TARGET),linux)
85VBoxClient_LDFLAGS.amd64 += \
86 -Wl,--wrap=memcpy
87endif
88
89ifdef VBOX_WITH_GUEST_PROPS
90VBoxClient_DEFS += VBOX_WITH_GUEST_PROPS
91endif
92
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
104ifdef VBOX_WITH_SHARED_CLIPBOARD
105 VBoxClient_DEFS += \
106 VBOX_WITH_SHARED_CLIPBOARD \
107 $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
108 VBoxClient_SOURCES += \
109 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-common.cpp \
110 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp \
111 clipboard.cpp
112 ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
113 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_GUEST
114 VBoxClient_SOURCES += \
115 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers.cpp \
116 $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardPath.cpp
117 ifdef VBOX_WITH_SHARED_CLIPBOARD_FUSE
118 VBoxClient_DEFS += VBOX_WITH_SHARED_CLIPBOARD_FUSE
119 # @todo Make this dynamic loading more generic.
120 VBoxClient_SOURCES += \
121 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount/fuse.cpp \
122 clipboard-fuse.cpp
123 # @todo Ditto.
124 VBoxClient_INCS += \
125 $(PATH_ROOT)/src/VBox/ImageMounter/vboximg-mount
126 endif
127 endif
128endif
129
130if defined(VBOX_WITH_TESTCASES) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_SDK)
131 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
132
133# Set this in LocalConfig.kmk if you are working on the X11 clipboard service
134# to automatically run the unit test at build time.
135# OTHERS += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run
136
137 PROGRAMS += tstSeamlessX11-auto
138 tstSeamlessX11-auto_TEMPLATE = VBOXR3TSTEXE
139 tstSeamlessX11-auto_SOURCES = \
140 testcase/tstSeamlessX11-auto.cpp \
141 seamless-x11.cpp
142 tstSeamlessX11-auto_DEFS = TESTCASE
143 tstSeamlessX11-auto_LIBS = \
144 $(LIB_RUNTIME)
145
146 TESTING += $(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto
147$$(tstSeamlessX11-auto_0_OUTDIR)/tstSeamlessX11-auto.run: \
148 $$(tstSeamlessX11-auto_1_STAGE_TARGET)
149 export VBOX_LOG_DEST=nofile; $(tstSeamlessX11-auto_1_STAGE_TARGET) quiet
150 $(QUIET)$(APPEND) -t "$@" "done"
151
152 #
153 # Additional testcase designed to be run manually, which initiates and starts the Linux
154 # guest client part of the seamless additions in the host, faking seamless events from
155 # the host and writing information about guest events to standard output.
156 #
157 PROGRAMS += tstSeamlessX11
158 tstSeamlessX11_TEMPLATE = VBOXR3TSTEXE
159 tstSeamlessX11_SOURCES = \
160 testcase/tstSeamlessX11.cpp \
161 seamless.cpp \
162 seamless-x11.cpp
163 tstSeamlessX11_LIBPATH = \
164 $(VBOX_LIBPATH_X11)
165 tstSeamlessX11_LIBS = \
166 $(LIB_RUNTIME) \
167 Xext \
168 Xmu \
169 X11
170 endif
171endif
172
173include $(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