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