1 | # $Id: Makefile.kmk 69111 2017-10-17 14:26:02Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the common guest addition code library.
|
---|
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 | # 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 | LIBRARIES += \
|
---|
44 | VBoxGuestR3LibXFree86
|
---|
45 | endif
|
---|
46 | if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
|
---|
47 | LIBRARIES += \
|
---|
48 | VBoxGuestR3LibXOrg
|
---|
49 | endif
|
---|
50 | endif
|
---|
51 | LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86
|
---|
52 |
|
---|
53 |
|
---|
54 | #
|
---|
55 | # VBoxGuestR0Lib
|
---|
56 | #
|
---|
57 | VBoxGuestR0Lib_TEMPLATE = VBOXGUESTR0LIB
|
---|
58 | VBoxGuestR0Lib_DEFS = VBOX_WITH_HGCM \
|
---|
59 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
60 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
61 | VBoxGuestR0Lib_INCS = \
|
---|
62 | $(VBoxGuestR0Lib_0_OUTDIR)
|
---|
63 | VBoxGuestR0Lib_SOURCES = \
|
---|
64 | VBoxGuestR0LibInit.cpp \
|
---|
65 | VBoxGuestR0LibPhysHeap.cpp \
|
---|
66 | VBoxGuestR0LibGenericRequest.cpp \
|
---|
67 | VBoxGuestR0LibVMMDev.cpp \
|
---|
68 | VBoxGuestR0LibHGCM.cpp \
|
---|
69 | VbglR0CanUsePhysPageList.cpp \
|
---|
70 | \
|
---|
71 | VBoxGuestR0LibIdc.cpp \
|
---|
72 | VBoxGuestR0LibSharedFolders.c \
|
---|
73 | VBoxGuestR0LibCrOgl.cpp \
|
---|
74 | VBoxGuestR0LibMouse.cpp
|
---|
75 | VBoxGuestR0Lib_SOURCES.os2 = VBoxGuestR0LibIdc-os2.cpp
|
---|
76 | VBoxGuestR0Lib_SOURCES.solaris = VBoxGuestR0LibIdc-solaris.cpp
|
---|
77 | VBoxGuestR0Lib_SOURCES.win = VBoxGuestR0LibIdc-win.cpp
|
---|
78 | ifn1of ($(KBUILD_TARGET), os2 solaris win)
|
---|
79 | VBoxGuestR0Lib_SOURCES += VBoxGuestR0LibIdc-unix.cpp
|
---|
80 | endif
|
---|
81 |
|
---|
82 | #
|
---|
83 | # VBoxGuestR0LibBase
|
---|
84 | #
|
---|
85 | VBoxGuestR0LibBase_TEMPLATE = VBOXGUESTR0LIB
|
---|
86 | VBoxGuestR0LibBase_DEFS = VBOX_WITH_HGCM VBGL_VBOXGUEST \
|
---|
87 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
88 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
89 | VBoxGuestR0LibBase_INCS = $(VBoxGuestR0Lib_INCS)
|
---|
90 | VBoxGuestR0LibBase_INCS.win = $(VBoxGuestR0Lib_INCS.win)
|
---|
91 | VBoxGuestR0LibBase_SOURCES = \
|
---|
92 | VBoxGuestR0LibInit.cpp \
|
---|
93 | VBoxGuestR0LibPhysHeap.cpp \
|
---|
94 | VBoxGuestR0LibGenericRequest.cpp \
|
---|
95 | VBoxGuestR0LibVMMDev.cpp \
|
---|
96 | VBoxGuestR0LibHGCMInternal.cpp \
|
---|
97 | VbglR0CanUsePhysPageList.cpp
|
---|
98 |
|
---|
99 | #
|
---|
100 | # VBoxGuestR3Lib
|
---|
101 | #
|
---|
102 | if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Lib everywhere
|
---|
103 | VBoxGuestR3Lib_TEMPLATE = VBoxGuestR3Lib
|
---|
104 | else
|
---|
105 | VBoxGuestR3Lib_TEMPLATE = VBOXGUESTR3LIB
|
---|
106 | endif
|
---|
107 | VBoxGuestR3Lib_DEFS = \
|
---|
108 | VBOX_WITH_HGCM \
|
---|
109 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
110 | $(if $(VBOX_WITH_SHARED_FOLDERS),VBOX_WITH_SHARED_FOLDERS,) \
|
---|
111 | $(if $(VBOX_WITH_GUEST_CONTROL),VBOX_WITH_GUEST_CONTROL,)
|
---|
112 | VBoxGuestR3Lib_SOURCES = \
|
---|
113 | VBoxGuestR3Lib.cpp \
|
---|
114 | VBoxGuestR3LibAdditions.cpp \
|
---|
115 | VBoxGuestR3LibAutoLogon.cpp \
|
---|
116 | VBoxGuestR3LibBalloon.cpp \
|
---|
117 | VBoxGuestR3LibClipboard.cpp \
|
---|
118 | VBoxGuestR3LibCoreDump.cpp \
|
---|
119 | VBoxGuestR3LibCpuHotPlug.cpp \
|
---|
120 | VBoxGuestR3LibCredentials.cpp \
|
---|
121 | VBoxGuestR3LibEvent.cpp \
|
---|
122 | VBoxGuestR3LibGuestUser.cpp \
|
---|
123 | VBoxGuestR3LibGR.cpp \
|
---|
124 | VBoxGuestR3LibHGCM.cpp \
|
---|
125 | VBoxGuestR3LibHostChannel.cpp \
|
---|
126 | VBoxGuestR3LibLog.cpp \
|
---|
127 | VBoxGuestR3LibMisc.cpp \
|
---|
128 | VBoxGuestR3LibStat.cpp \
|
---|
129 | VBoxGuestR3LibTime.cpp \
|
---|
130 | VBoxGuestR3LibModule.cpp \
|
---|
131 | VBoxGuestR3LibPidFile.cpp \
|
---|
132 | VBoxGuestR3LibVrdp.cpp \
|
---|
133 | VBoxGuestR3LibMouse.cpp \
|
---|
134 | VBoxGuestR3LibSeamless.cpp \
|
---|
135 | VBoxGuestR3LibVideo.cpp
|
---|
136 | ifneq ($(KBUILD_TARGET),win)
|
---|
137 | VBoxGuestR3Lib_SOURCES += \
|
---|
138 | VBoxGuestR3LibDaemonize.cpp
|
---|
139 | endif
|
---|
140 | ifdef VBOX_WITH_GUEST_PROPS
|
---|
141 | VBoxGuestR3Lib_SOURCES += \
|
---|
142 | VBoxGuestR3LibGuestProp.cpp \
|
---|
143 | VBoxGuestR3LibHostVersion.cpp
|
---|
144 | endif
|
---|
145 | ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
146 | VBoxGuestR3Lib_SOURCES += \
|
---|
147 | VBoxGuestR3LibSharedFolders.cpp
|
---|
148 | endif
|
---|
149 | ifdef VBOX_WITH_GUEST_CONTROL
|
---|
150 | VBoxGuestR3Lib_SOURCES += \
|
---|
151 | VBoxGuestR3LibGuestCtrl.cpp
|
---|
152 | endif
|
---|
153 | ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
154 | VBoxGuestR3Lib_DEFS += \
|
---|
155 | VBOX_WITH_DRAG_AND_DROP \
|
---|
156 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
157 | VBoxGuestR3Lib_SOURCES += \
|
---|
158 | VBoxGuestR3LibDragAndDrop.cpp
|
---|
159 | endif
|
---|
160 |
|
---|
161 | VBoxGuestR3LibAdditions.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
162 |
|
---|
163 | #
|
---|
164 | # VBoxGuestR3LibShared - a PIC variant of VBoxGuestR3Lib for linking into .so/.dll/.dylib.
|
---|
165 | #
|
---|
166 | if "$(KBUILD_TARGET)" == "win" || defined(VBOX_WITH_MASOCHISTIC_WARNINGS) ## @todo use VBoxGuestR3Lib everywhere
|
---|
167 | VBoxGuestR3LibShared_TEMPLATE = VBoxGuestR3Dll
|
---|
168 | else
|
---|
169 | VBoxGuestR3LibShared_TEMPLATE = VBOXGUESTR3DLL
|
---|
170 | endif
|
---|
171 | VBoxGuestR3LibShared_DEFS := $(VBoxGuestR3Lib_DEFS)
|
---|
172 | VBoxGuestR3LibShared_SOURCES := $(VBoxGuestR3Lib_SOURCES)
|
---|
173 | VBoxGuestR3LibShared_INST := $(INST_ADDITIONS_LIB)
|
---|
174 |
|
---|
175 |
|
---|
176 | #
|
---|
177 | # VBoxGuestR3Lib-x86 - an x86 (32-bit) variant of VBoxGuestR3Lib for 64-bit Windows.
|
---|
178 | #
|
---|
179 | VBoxGuestR3Lib-x86_EXTENDS := VBoxGuestR3Lib
|
---|
180 | VBoxGuestR3Lib-x86_BLD_TRG_ARCH := x86
|
---|
181 |
|
---|
182 |
|
---|
183 | #
|
---|
184 | # VBoxGuestR3LibShared-x86 - an x86 (32-bit) variant of VBoxGuestR3LibShared for 64-bit Windows.
|
---|
185 | #
|
---|
186 | VBoxGuestR3LibShared-x86_EXTENDS := VBoxGuestR3LibShared
|
---|
187 | VBoxGuestR3LibShared-x86_BLD_TRG_ARCH := x86
|
---|
188 |
|
---|
189 |
|
---|
190 | #
|
---|
191 | # VBoxGuestR3LibXFree86 - a reduced version of the guest library which uses
|
---|
192 | # the X server runtime instead of IPRT, for use with old servers where the
|
---|
193 | # C library is not available.
|
---|
194 | #
|
---|
195 | VBoxGuestR3LibXFree86_TEMPLATE = VBOXGUESTR3XF86LIB
|
---|
196 | VBoxGuestR3LibXFree86_DEFS = \
|
---|
197 | VBOX_WITH_HGCM \
|
---|
198 | VBOX_VBGLR3_XFREE86 \
|
---|
199 | RTMEM_NO_WRAP_TO_EF_APIS \
|
---|
200 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
201 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
202 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
203 | VBoxGuestR3LibXFree86_SOURCES = \
|
---|
204 | VBoxGuestR3Lib.cpp \
|
---|
205 | VBoxGuestR3LibGR.cpp \
|
---|
206 | $(if $(VBOX_WITH_GUEST_PROPS),VBoxGuestR3LibGuestProp.cpp,) \
|
---|
207 | VBoxGuestR3LibMouse.cpp \
|
---|
208 | VBoxGuestR3LibMisc.cpp \
|
---|
209 | VBoxGuestR3LibSeamless.cpp \
|
---|
210 | VBoxGuestR3LibVideo.cpp \
|
---|
211 | VBoxGuestR3LibRuntimeXF86.cpp
|
---|
212 | VBoxGuestR3LibXFree86_INCS = \
|
---|
213 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/Xserver \
|
---|
214 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3 \
|
---|
215 | $(VBOX_PATH_X11_ROOT)/XFree86-4.3/X11
|
---|
216 |
|
---|
217 | #
|
---|
218 | # VBoxGuestR3LibXOrg - a reduced version of the guest library which uses
|
---|
219 | # the C server runtime instead of IPRT.
|
---|
220 | #
|
---|
221 | VBoxGuestR3LibXOrg_TEMPLATE = VBOXGUESTR3XORGLIB
|
---|
222 | VBoxGuestR3LibXOrg_DEFS = \
|
---|
223 | VBOX_WITH_HGCM \
|
---|
224 | VBOX_VBGLR3_XORG \
|
---|
225 | RTMEM_NO_WRAP_TO_EF_APIS \
|
---|
226 | IN_RT_STATIC \
|
---|
227 | $(if $(VBOX_WITH_GUEST_PROPS),VBOX_WITH_GUEST_PROPS,) \
|
---|
228 | $(if $(VBOX_WITH_DRAG_AND_DROP),VBOX_WITH_DRAG_AND_DROP,) \
|
---|
229 | $(if $(VBOX_WITH_DRAG_AND_DROP_GH),VBOX_WITH_DRAG_AND_DROP_GH,)
|
---|
230 | VBoxGuestR3LibXOrg_SOURCES = $(VBoxGuestR3LibXFree86_SOURCES)
|
---|
231 |
|
---|
232 | VBoxGuestR3LibRuntimeXF86.cpp_CXXFLAGS = -Wno-shadow
|
---|
233 |
|
---|
234 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
235 |
|
---|