1 | # $Id: Makefile.kmk 99965 2023-05-25 08:28:24Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the common guest addition code library.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2023 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # The contents of this file may alternatively be used under the terms
|
---|
26 | # of the Common Development and Distribution License Version 1.0
|
---|
27 | # (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
28 | # in the VirtualBox distribution, in which case the provisions of the
|
---|
29 | # CDDL are applicable instead of those of the GPL.
|
---|
30 | #
|
---|
31 | # You may elect to license modified versions of this file under the
|
---|
32 | # terms and conditions of either the GPL or the CDDL or both.
|
---|
33 | #
|
---|
34 | # SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
35 | #
|
---|
36 |
|
---|
37 | SUB_DEPTH = ../../../../../..
|
---|
38 | include $(KBUILD_PATH)/subheader.kmk
|
---|
39 |
|
---|
40 | include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
|
---|
41 |
|
---|
42 | #
|
---|
43 | # Target config.
|
---|
44 | #
|
---|
45 | if defined(VBOX_WITH_ADDITION_DRIVERS) && !defined(VBOX_ONLY_VALIDATIONKIT)
|
---|
46 | LIBRARIES += \
|
---|
47 | VBoxGuestR0Lib \
|
---|
48 | VBoxGuestR0LibBase
|
---|
49 | endif
|
---|
50 | LIBRARIES += \
|
---|
51 | VBoxGuestR3Lib \
|
---|
52 | VBoxGuestR3LibShared
|
---|
53 | ifndef VBOX_ONLY_VALIDATIONKIT
|
---|
54 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
|
---|
55 | ifndef VBOX_USE_SYSTEM_XORG_HEADERS
|
---|
56 | LIBRARIES += \
|
---|
57 | VBoxGuestR3LibXFree86
|
---|
58 | endif
|
---|
59 | endif
|
---|
60 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
61 | LIBRARIES += \
|
---|
62 | VBoxGuestR3LibXOrg
|
---|
63 | endif
|
---|
64 | endif
|
---|
65 | LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86
|
---|
66 |
|
---|
67 |
|
---|
68 | #
|
---|
69 | # VBoxGuestR0Lib
|
---|
70 | #
|
---|
71 | VBoxGuestR0Lib_TEMPLATE = VBoxGuestR0DrvLib
|
---|
72 | VBoxGuestR0Lib_DEFS = VBOX_WITH_HGCM \
|
---|
73 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
74 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
75 | VBoxGuestR0Lib_INCS = \
|
---|
76 | $(VBoxGuestR0Lib_0_OUTDIR)
|
---|
77 | VBoxGuestR0Lib_SOURCES = \
|
---|
78 | VBoxGuestR0LibInit.cpp \
|
---|
79 | VBoxGuestR0LibPhysHeap.cpp \
|
---|
80 | VBoxGuestR0LibGenericRequest.cpp \
|
---|
81 | VBoxGuestR0LibVMMDev.cpp \
|
---|
82 | VBoxGuestR0LibHGCM.cpp \
|
---|
83 | VbglR0CanUsePhysPageList.cpp \
|
---|
84 | \
|
---|
85 | VBoxGuestR0LibIdc.cpp \
|
---|
86 | VBoxGuestR0LibSharedFolders.c \
|
---|
87 | VBoxGuestR0LibCrOgl.cpp \
|
---|
88 | VBoxGuestR0LibMouse.cpp
|
---|
89 | VBoxGuestR0Lib_SOURCES.os2 = VBoxGuestR0LibIdc-os2.cpp
|
---|
90 | VBoxGuestR0Lib_SOURCES.solaris = VBoxGuestR0LibIdc-solaris.cpp
|
---|
91 | VBoxGuestR0Lib_SOURCES.win = VBoxGuestR0LibIdc-win.cpp
|
---|
92 | ifn1of ($(KBUILD_TARGET), os2 solaris win)
|
---|
93 | VBoxGuestR0Lib_SOURCES += VBoxGuestR0LibIdc-unix.cpp
|
---|
94 | endif
|
---|
95 |
|
---|
96 | #
|
---|
97 | # VBoxGuestR0LibBase
|
---|
98 | #
|
---|
99 | VBoxGuestR0LibBase_TEMPLATE = VBoxGuestR0DrvLib
|
---|
100 | VBoxGuestR0LibBase_DEFS = VBOX_WITH_HGCM VBGL_VBOXGUEST \
|
---|
101 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
102 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
103 | VBoxGuestR0LibBase_INCS = $(VBoxGuestR0Lib_INCS)
|
---|
104 | VBoxGuestR0LibBase_INCS.win = $(VBoxGuestR0Lib_INCS.win)
|
---|
105 | VBoxGuestR0LibBase_SOURCES = \
|
---|
106 | VBoxGuestR0LibInit.cpp \
|
---|
107 | VBoxGuestR0LibPhysHeap.cpp \
|
---|
108 | VBoxGuestR0LibGenericRequest.cpp \
|
---|
109 | VBoxGuestR0LibVMMDev.cpp \
|
---|
110 | VBoxGuestR0LibHGCMInternal.cpp \
|
---|
111 | VbglR0CanUsePhysPageList.cpp
|
---|
112 |
|
---|
113 | #
|
---|
114 | # VBoxGuestR3Lib
|
---|
115 | #
|
---|
116 | VBoxGuestR3Lib_TEMPLATE := VBoxGuestR3Lib
|
---|
117 | VBoxGuestR3Lib_DEFS = \
|
---|
118 | VBOX_WITH_HGCM \
|
---|
119 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
120 | $(if $(VBOX_WITH_SHARED_CLIPBOARD),VBOX_WITH_SHARED_CLIPBOARD,) \
|
---|
121 | $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,) \
|
---|
122 | $(if $(VBOX_WITH_SHARED_FOLDERS),VBOX_WITH_SHARED_FOLDERS,) \
|
---|
123 | $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,) \
|
---|
124 | $(if $(VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS),VBOX_WITH_GSTCTL_TOOLBOX_AS_CMDS,)
|
---|
125 | VBoxGuestR3Lib_SOURCES = \
|
---|
126 | VBoxGuestR3Lib.cpp \
|
---|
127 | VBoxGuestR3LibAdditions.cpp \
|
---|
128 | VBoxGuestR3LibAutoLogon.cpp \
|
---|
129 | VBoxGuestR3LibBalloon.cpp \
|
---|
130 | VBoxGuestR3LibCoreDump.cpp \
|
---|
131 | VBoxGuestR3LibCpuHotPlug.cpp \
|
---|
132 | VBoxGuestR3LibCredentials.cpp \
|
---|
133 | VBoxGuestR3LibDrmClient.cpp \
|
---|
134 | VBoxGuestR3LibEvent.cpp \
|
---|
135 | VBoxGuestR3LibGuestUser.cpp \
|
---|
136 | VBoxGuestR3LibGR.cpp \
|
---|
137 | VBoxGuestR3LibHGCM.cpp \
|
---|
138 | VBoxGuestR3LibHostChannel.cpp \
|
---|
139 | VBoxGuestR3LibLog.cpp \
|
---|
140 | VBoxGuestR3LibMisc.cpp \
|
---|
141 | VBoxGuestR3LibStat.cpp \
|
---|
142 | VBoxGuestR3LibTime.cpp \
|
---|
143 | VBoxGuestR3LibModule.cpp \
|
---|
144 | VBoxGuestR3LibPidFile.cpp \
|
---|
145 | VBoxGuestR3LibVrdp.cpp \
|
---|
146 | VBoxGuestR3LibMouse.cpp \
|
---|
147 | VBoxGuestR3LibSeamless.cpp \
|
---|
148 | VBoxGuestR3LibVideo.cpp
|
---|
149 | ifneq ($(KBUILD_TARGET),win)
|
---|
150 | VBoxGuestR3Lib_SOURCES += \
|
---|
151 | VBoxGuestR3LibDaemonize.cpp
|
---|
152 | endif
|
---|
153 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
154 | VBoxGuestR3Lib_SOURCES += \
|
---|
155 | VBoxGuestR3LibGuestProp.cpp \
|
---|
156 | VBoxGuestR3LibHostVersion.cpp
|
---|
157 | endif
|
---|
158 | ifdef VBOX_WITH_SHARED_CLIPBOARD
|
---|
159 | VBoxGuestR3Lib_DEFS += VBOX_WITH_SHARED_CLIPBOARD_GUEST
|
---|
160 | VBoxGuestR3Lib_SOURCES += \
|
---|
161 | VBoxGuestR3LibClipboard.cpp
|
---|
162 | ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS
|
---|
163 | VBoxGuestR3Lib_SOURCES += \
|
---|
164 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/clipboard-transfers-provider-local.cpp \
|
---|
165 | $(PATH_ROOT)/src/VBox/GuestHost/SharedClipboard/ClipboardMIME.cpp
|
---|
166 | endif
|
---|
167 | endif
|
---|
168 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
169 | VBoxGuestR3Lib_SOURCES += \
|
---|
170 | VBoxGuestR3LibSharedFolders.cpp
|
---|
171 | endif
|
---|
172 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
173 | VBoxGuestR3Lib_SOURCES += \
|
---|
174 | VBoxGuestR3LibGuestCtrl.cpp
|
---|
175 | endif
|
---|
176 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
177 | VBoxGuestR3Lib_DEFS += \
|
---|
178 | VBOX_WITH_DRAG_AND_DROP \
|
---|
179 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
180 | VBoxGuestR3Lib_SOURCES += \
|
---|
181 | VBoxGuestR3LibDragAndDrop.cpp
|
---|
182 | endif
|
---|
183 |
|
---|
184 | VBoxGuestR3LibAdditions.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
185 |
|
---|
186 | #
|
---|
187 | # VBoxGuestR3LibShared - a PIC variant of VBoxGuestR3Lib for linking into .so/.dll/.dylib.
|
---|
188 | #
|
---|
189 | VBoxGuestR3LibShared_TEMPLATE := VBoxGuestR3Dll
|
---|
190 | VBoxGuestR3LibShared_DEFS := $(VBoxGuestR3Lib_DEFS)
|
---|
191 | VBoxGuestR3LibShared_SOURCES := $(VBoxGuestR3Lib_SOURCES)
|
---|
192 | VBoxGuestR3LibShared_INST := $(INST_ADDITIONS_LIB)
|
---|
193 |
|
---|
194 |
|
---|
195 | #
|
---|
196 | # VBoxGuestR3Lib-x86 - an x86 (32-bit) variant of VBoxGuestR3Lib for 64-bit Windows.
|
---|
197 | #
|
---|
198 | VBoxGuestR3Lib-x86_EXTENDS := VBoxGuestR3Lib
|
---|
199 | VBoxGuestR3Lib-x86_BLD_TRG_ARCH := x86
|
---|
200 |
|
---|
201 |
|
---|
202 | #
|
---|
203 | # VBoxGuestR3LibShared-x86 - an x86 (32-bit) variant of VBoxGuestR3LibShared for 64-bit Windows.
|
---|
204 | #
|
---|
205 | VBoxGuestR3LibShared-x86_EXTENDS := VBoxGuestR3LibShared
|
---|
206 | VBoxGuestR3LibShared-x86_BLD_TRG_ARCH := x86
|
---|
207 |
|
---|
208 |
|
---|
209 | #
|
---|
210 | # VBoxGuestR3LibXFree86 - a reduced version of the guest library which uses
|
---|
211 | # the X server runtime instead of IPRT, for use with old servers where the
|
---|
212 | # C library is not available.
|
---|
213 | #
|
---|
214 | VBoxGuestR3LibXFree86_TEMPLATE = VBoxGuestR3XFree86Lib
|
---|
215 | VBoxGuestR3LibXFree86_DEFS = \
|
---|
216 | VBOX_WITH_HGCM \
|
---|
217 | VBOX_VBGLR3_XFREE86 \
|
---|
218 | RTMEM_NO_WRAP_TO_EF_APIS \
|
---|
219 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
220 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
221 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
|
---|
222 | $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
|
---|
223 | VBoxGuestR3LibXFree86_SOURCES = \
|
---|
224 | VBoxGuestR3Lib.cpp \
|
---|
225 | VBoxGuestR3LibGR.cpp \
|
---|
226 | $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestR3LibGuestProp.cpp,) \
|
---|
227 | VBoxGuestR3LibMouse.cpp \
|
---|
228 | VBoxGuestR3LibMisc.cpp \
|
---|
229 | VBoxGuestR3LibSeamless.cpp \
|
---|
230 | VBoxGuestR3LibVideo.cpp \
|
---|
231 | VBoxGuestR3LibRuntimeXF86.cpp
|
---|
232 | VBoxGuestR3LibXFree86_INCS = \
|
---|
233 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/Xserver \
|
---|
234 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3 \
|
---|
235 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/X11
|
---|
236 |
|
---|
237 | #
|
---|
238 | # VBoxGuestR3LibXOrg - a reduced version of the guest library which uses
|
---|
239 | # the C server runtime instead of IPRT.
|
---|
240 | #
|
---|
241 | VBoxGuestR3LibXOrg_TEMPLATE = VBoxGuestR3XOrgLib
|
---|
242 | VBoxGuestR3LibXOrg_DEFS = \
|
---|
243 | VBOX_WITH_HGCM \
|
---|
244 | VBOX_VBGLR3_XORG \
|
---|
245 | RTMEM_NO_WRAP_TO_EF_APIS \
|
---|
246 | IN_RT_STATIC \
|
---|
247 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
248 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
249 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,) \
|
---|
250 | $(if $(VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS),VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS,)
|
---|
251 | VBoxGuestR3LibXOrg_SOURCES = $(VBoxGuestR3LibXFree86_SOURCES)
|
---|
252 |
|
---|
253 | VBoxGuestR3LibRuntimeXF86.cpp_CXXFLAGS = -Wno-shadow
|
---|
254 |
|
---|
255 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
256 |
|
---|