1 | # $Id: Makefile.kmk 86646 2020-10-20 12:44:11Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for Python bindings
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 | #
|
---|
22 | # List of supported Python versions, defining a number of
|
---|
23 | # VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|DEF]_[INC|LIB] variables
|
---|
24 | # which get picked up below.
|
---|
25 | #
|
---|
26 | ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
|
---|
27 | ifn1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.10 10.9 10.8 10.7 10.6 10.5 10.4) ## @todo @bugref{9790}: if $(VBOX_DEF_MACOSX_VERSION_MIN) vge 10.11
|
---|
28 | VBOX_PYTHON_SUFFTBD := .tbd
|
---|
29 | else
|
---|
30 | VBOX_PYTHON_SUFFTBD :=
|
---|
31 | endif
|
---|
32 | ifndef VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6
|
---|
33 | if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.5 10.4)
|
---|
34 | VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/include/python2.6
|
---|
35 | VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib
|
---|
36 | else if "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.9" && "$(VBOX_XCODE_VERSION)" == "6.2" # 'effing 10.9 SDK in Xcode 6.2 is missing python. Stupid, stupid Apple!!
|
---|
37 | VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK)/../MacOSX10.10.sdk/System/Library/Frameworks/Python.framework/Versions/2.6/Headers
|
---|
38 | VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK)/../MacOSX10.10.sdk/System/Library/Frameworks/Python.framework/Versions/2.6/Python
|
---|
39 | else if "$(VBOX_DEF_MACOSX_VERSION_MIN)" vlt "10.13"
|
---|
40 | VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Python.framework/Versions/2.6/Headers
|
---|
41 | VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Python.framework/Versions/2.6/Python$(VBOX_PYTHON_SUFFTBD)
|
---|
42 | endif
|
---|
43 | if !defined(VBOX_OSE) || "$(wildcard $(VBOX_PYTHON26_LIB))" != ""
|
---|
44 | VBOX_PYTHON26_LIB_X86 = $(VBOX_PYTHON26_LIB)
|
---|
45 | else
|
---|
46 | VBOX_PYTHON26_INC =
|
---|
47 | VBOX_PYTHON26_LIB =
|
---|
48 | endif
|
---|
49 | endif
|
---|
50 | ifndef VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7
|
---|
51 | if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.6 10.5 10.4)
|
---|
52 | VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/include/python2.7
|
---|
53 | VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib
|
---|
54 | else if "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.9" && "$(VBOX_XCODE_VERSION)" == "6.2" # 'effing 10.9 SDK in Xcode 6.2 is missing python. Stupid, stupid Apple!!
|
---|
55 | VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK)/../MacOSX10.10.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/Headers
|
---|
56 | VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK)/../MacOSX10.10.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/Python
|
---|
57 | else
|
---|
58 | VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Python.framework/Versions/2.7/Headers
|
---|
59 | VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Python.framework/Versions/2.7/Python$(VBOX_PYTHON_SUFFTBD)
|
---|
60 | endif
|
---|
61 | if !defined(VBOX_OSE) || "$(wildcard $(VBOX_PYTHON27_LIB))" != ""
|
---|
62 | VBOX_PYTHON27_LIB_X86 = $(VBOX_PYTHON27_LIB)
|
---|
63 | else
|
---|
64 | VBOX_PYTHON27_INC =
|
---|
65 | VBOX_PYTHON27_LIB =
|
---|
66 | endif
|
---|
67 | endif
|
---|
68 | # No Python 3.x yet as part of OSX versions including El Capitan, 10.11.
|
---|
69 |
|
---|
70 | else
|
---|
71 | # Use the script.
|
---|
72 | $(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) \
|
---|
73 | $(PATH_SUB_CURRENT)/gen_python_deps.py \
|
---|
74 | $(KBUILD_TARGET) \
|
---|
75 | $(KBUILD_TARGET_ARCH) \
|
---|
76 | $(if-expr defined(VBOX_WITH_MULTIVERSION_PYTHON),1,0))))
|
---|
77 | endif
|
---|
78 |
|
---|
79 | ifndef VBOX_ONLY_SDK
|
---|
80 |
|
---|
81 | #
|
---|
82 | # Base Python Client Module - the C++/XPCOM bits (not actually built).
|
---|
83 | #
|
---|
84 | VBoxPythonBase_TEMPLATE = XPCOM
|
---|
85 | VBoxPythonBase_CXXFLAGS = -Wno-write-strings
|
---|
86 | VBoxPythonBase_DLLSUFF.darwin = .so
|
---|
87 | VBoxPythonBase_DEFS = \
|
---|
88 | _IMPL_NS_COM \
|
---|
89 | _IMPL_NS_BASE \
|
---|
90 | EXPORT_XPTI_API \
|
---|
91 | EXPORT_XPT_API \
|
---|
92 | VBOX_PYXPCOM \
|
---|
93 | VBOX_WITH_XPCOM \
|
---|
94 | VBOX_PYXPCOM_VERSIONED
|
---|
95 | #VBoxPythonBase_DEFS.debug = \
|
---|
96 | # VBOX_DEBUG_LIFETIMES
|
---|
97 | VBoxPythonBase_INCS = \
|
---|
98 | src
|
---|
99 | VBoxPythonBase_SOURCES = \
|
---|
100 | src/module/_xpcom.cpp \
|
---|
101 | src/dllmain.cpp \
|
---|
102 | src/ErrorUtils.cpp \
|
---|
103 | src/PyGBase.cpp \
|
---|
104 | src/PyGInputStream.cpp \
|
---|
105 | src/PyGModule.cpp \
|
---|
106 | src/PyGStub.cpp \
|
---|
107 | src/PyGWeakReference.cpp \
|
---|
108 | src/PyIClassInfo.cpp \
|
---|
109 | src/PyIComponentManager.cpp \
|
---|
110 | src/PyIComponentManagerObsolete.cpp \
|
---|
111 | src/PyIEnumerator.cpp \
|
---|
112 | src/PyIID.cpp \
|
---|
113 | src/PyIInputStream.cpp \
|
---|
114 | src/PyIInterfaceInfo.cpp \
|
---|
115 | src/PyIInterfaceInfoManager.cpp \
|
---|
116 | src/PyISimpleEnumerator.cpp \
|
---|
117 | src/PyISupports.cpp \
|
---|
118 | src/PyIVariant.cpp \
|
---|
119 | src/Pyxpt_info.cpp \
|
---|
120 | src/TypeObject.cpp \
|
---|
121 | src/VariantUtils.cpp
|
---|
122 | VBoxPythonBase_LIBS = \
|
---|
123 | $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
|
---|
124 | $(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
|
---|
125 |
|
---|
126 | # pymalloc abi variant.
|
---|
127 | VBoxPythonBase_m_EXTENDS = VBoxPythonBase
|
---|
128 | VBoxPythonBase_m_DEFS = MODULE_NAME_SUFFIX=m $(VBoxPythonBase_DEFS)
|
---|
129 |
|
---|
130 | # 32-bit base.
|
---|
131 | VBoxPythonBase_x86_TEMPLATE = XPCOM-x86
|
---|
132 | VBoxPythonBase_x86_EXTENDS = VBoxPythonBase
|
---|
133 | VBoxPythonBase_x86_DEFS = MODULE_NAME_SUFFIX=_x86 $(VBoxPythonBase_DEFS)
|
---|
134 | VBoxPythonBase_x86_LIBS = \
|
---|
135 | $(PATH_STAGE_LIB)/VBoxCOM-x86$(VBOX_SUFF_LIB) \
|
---|
136 | $(PATH_STAGE_BIN)/VBoxXPCOM-x86$(VBOX_SUFF_DLL)
|
---|
137 |
|
---|
138 | # 32-bit pymalloc abi variant.
|
---|
139 | VBoxPythonBase_x86_m_EXTENDS = VBoxPythonBase_x86
|
---|
140 | VBoxPythonBase_x86_m_DEFS = MODULE_NAME_SUFFIX=_x86m $(VBoxPythonBase_DEFS)
|
---|
141 |
|
---|
142 |
|
---|
143 | ifdef VBOX_PYTHON26_INC
|
---|
144 | #
|
---|
145 | # Python 2.6 version
|
---|
146 | #
|
---|
147 | DLLS += VBoxPython2_6
|
---|
148 | VBoxPython2_6_EXTENDS = VBoxPythonBase
|
---|
149 | VBoxPython2_6_EXTENDS_BY = appending
|
---|
150 | ifdef KMK_WITH_VERSION_COMPARE
|
---|
151 | VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.6",OSX106,)
|
---|
152 | else
|
---|
153 | VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.6",OSX106,)
|
---|
154 | endif
|
---|
155 | VBoxPython2_6_INCS = $(VBOX_PYTHON26_INC)
|
---|
156 | VBoxPython2_6_LIBS = $(VBOX_PYTHON26_LIB)
|
---|
157 |
|
---|
158 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
159 | ifdef VBOX_PYTHON26_LIB_X86
|
---|
160 | DLLS += VBoxPython2_6_x86
|
---|
161 | VBoxPython2_6_x86_EXTENDS = VBoxPythonBase_x86
|
---|
162 | VBoxPython2_6_x86_EXTENDS_BY = appending
|
---|
163 | ifdef KMK_WITH_VERSION_COMPARE
|
---|
164 | VBoxPython2_6_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.6",OSX106,-x86)
|
---|
165 | else
|
---|
166 | VBoxPython2_6_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.6",OSX106,-x86)
|
---|
167 | endif
|
---|
168 | VBoxPython2_6_x86_INCS = $(VBOX_PYTHON26_INC)
|
---|
169 | VBoxPython2_6_x86_LIBS = $(VBOX_PYTHON26_LIB_X86)
|
---|
170 | endif
|
---|
171 | endif
|
---|
172 | endif
|
---|
173 |
|
---|
174 | ifdef VBOX_PYTHON27_INC
|
---|
175 | #
|
---|
176 | # Python 2.7 version
|
---|
177 | #
|
---|
178 | DLLS += VBoxPython2_7
|
---|
179 | VBoxPython2_7_EXTENDS = VBoxPythonBase
|
---|
180 | VBoxPython2_7_EXTENDS_BY = appending
|
---|
181 | ifdef KMK_WITH_VERSION_COMPARE
|
---|
182 | VBoxPython2_7_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.7",OSX107,)
|
---|
183 | else
|
---|
184 | VBoxPython2_7_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.7" && "$(length-var VBOX_DEF_MACOSX_VERSION_MIN)" == "4",OSX107,)
|
---|
185 | endif
|
---|
186 | VBoxPython2_7_INCS = $(VBOX_PYTHON27_INC)
|
---|
187 | VBoxPython2_7_LIBS = $(VBOX_PYTHON27_LIB)
|
---|
188 |
|
---|
189 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
190 | ifdef VBOX_PYTHON27_LIB_X86
|
---|
191 | DLLS += VBoxPython2_7_x86
|
---|
192 | VBoxPython2_7_x86_EXTENDS = VBoxPythonBase_x86
|
---|
193 | VBoxPython2_7_x86_EXTENDS_BY = appending
|
---|
194 | ifdef KMK_WITH_VERSION_COMPARE
|
---|
195 | VBoxPython2_7_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.7",OSX107,-x86)
|
---|
196 | else
|
---|
197 | VBoxPython2_7_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.7" && "$(length-var VBOX_DEF_MACOSX_VERSION_MIN)" == "4",OSX107,-x86)
|
---|
198 | endif
|
---|
199 | VBoxPython2_7_x86_INCS = $(VBOX_PYTHON27_INC)
|
---|
200 | VBoxPython2_7_x86_LIBS = $(VBOX_PYTHON27_LIB_X86)
|
---|
201 | endif
|
---|
202 | endif
|
---|
203 | endif
|
---|
204 |
|
---|
205 | #
|
---|
206 | # Unversioned Python 2.x.
|
---|
207 | #
|
---|
208 | if defined(VBOX_PYTHON27_INC) || defined(VBOX_PYTHON26_INC)
|
---|
209 | DLLS += VBoxPython2
|
---|
210 | VBoxPython2_EXTENDS = VBoxPythonBase
|
---|
211 | VBoxPython2_EXTENDS_BY = appending
|
---|
212 | VBoxPython2_DEFS = VBOX_PYXPCOM_MAJOR_VERSIONED
|
---|
213 | ifdef KMK_WITH_VERSION_COMPARE
|
---|
214 | VBoxPython2_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.7",OSX107,)
|
---|
215 | else
|
---|
216 | VBoxPython2_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.7" && "$(length-var VBOX_DEF_MACOSX_VERSION_MIN)" == "4",OSX107,)
|
---|
217 | endif
|
---|
218 | if defined(VBOX_PYTHON26_INC)
|
---|
219 | VBoxPython2_INCS = $(VBOX_PYTHON26_INC)
|
---|
220 | ifn1of ($(KBUILD_TARGET), linux)
|
---|
221 | VBoxPython2_LIBS = $(VBOX_PYTHON26_LIB)
|
---|
222 | endif
|
---|
223 | else
|
---|
224 | VBoxPython2_INCS = $(VBOX_PYTHON27_INC)
|
---|
225 | ifn1of ($(KBUILD_TARGET), linux)
|
---|
226 | VBoxPython2_LIBS = $(VBOX_PYTHON27_LIB)
|
---|
227 | endif
|
---|
228 | endif
|
---|
229 | endif
|
---|
230 |
|
---|
231 | if defined(VBOX_WITH_32_ON_64_MAIN_API) && (defined(VBOX_PYTHON27_LIB_X86) || defined(VBOX_PYTHON26_INC_X86))
|
---|
232 | DLLS += VBoxPython2_x86
|
---|
233 | VBoxPython2_x86_EXTENDS = VBoxPythonBase_x86
|
---|
234 | VBoxPython2_x86_EXTENDS_BY = appending
|
---|
235 | VBoxPython2_x86_DEFS = VBOX_PYXPCOM_MAJOR_VERSIONED $(VBoxPythonBase_x86_DEFS)
|
---|
236 | ifdef KMK_WITH_VERSION_COMPARE
|
---|
237 | VBoxPython2_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" vle "10.7",OSX107,-x86)
|
---|
238 | else
|
---|
239 | VBoxPython2_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.7" && "$(length-var VBOX_DEF_MACOSX_VERSION_MIN)" == "4",OSX107,-x86)
|
---|
240 | endif
|
---|
241 | if defined(VBOX_PYTHON26LIB_X86)
|
---|
242 | VBoxPython2_x86_INCS = $(VBOX_PYTHON26_INC)
|
---|
243 | ifn1of ($(KBUILD_TARGET), linux)
|
---|
244 | VBoxPython2_x86_LIBS = $(VBOX_PYTHON26_LIB_X86)
|
---|
245 | endif
|
---|
246 | else
|
---|
247 | VBoxPython2_x86_INCS = $(VBOX_PYTHON27_INC)
|
---|
248 | ifn1of ($(KBUILD_TARGET), linux)
|
---|
249 | VBoxPython2_x86_LIBS = $(VBOX_PYTHON27_LIB_X86)
|
---|
250 | endif
|
---|
251 | endif
|
---|
252 | endif
|
---|
253 |
|
---|
254 |
|
---|
255 | ifdef VBOX_PYTHON31_INC
|
---|
256 | #
|
---|
257 | # Python 3.1 version
|
---|
258 | #
|
---|
259 | DLLS += VBoxPython3_1
|
---|
260 | VBoxPython3_1_EXTENDS = VBoxPythonBase
|
---|
261 | VBoxPython3_1_EXTENDS_BY = appending
|
---|
262 | VBoxPython3_1_TEMPLATE = XPCOM
|
---|
263 | VBoxPython3_1_INCS = $(VBOX_PYTHON31_INC)
|
---|
264 | VBoxPython3_1_LIBS = $(VBOX_PYTHON31_LIB)
|
---|
265 |
|
---|
266 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
267 | ifdef VBOX_PYTHON31_LIB_X86
|
---|
268 | DLLS += VBoxPython3_1_x86
|
---|
269 | VBoxPython3_1_x86_EXTENDS = VBoxPythonBase_x86
|
---|
270 | VBoxPython3_1_x86_EXTENDS_BY = appending
|
---|
271 | VBoxPython3_1_x86_TEMPLATE = XPCOM
|
---|
272 | VBoxPython3_1_x86_INCS = $(VBOX_PYTHON31_INC)
|
---|
273 | VBoxPython3_1_x86_LIBS = $(VBOX_PYTHON31_LIB_X86)
|
---|
274 | endif
|
---|
275 | endif
|
---|
276 | endif
|
---|
277 |
|
---|
278 | ifdef VBOX_PYTHON32_INC
|
---|
279 | #
|
---|
280 | # Python 3.2 version
|
---|
281 | #
|
---|
282 | DLLS += VBoxPython3_2
|
---|
283 | VBoxPython3_2_EXTENDS = VBoxPythonBase
|
---|
284 | VBoxPython3_2_EXTENDS_BY = appending
|
---|
285 | VBoxPython3_2_TEMPLATE = XPCOM
|
---|
286 | VBoxPython3_2_INCS = $(VBOX_PYTHON32_INC)
|
---|
287 | VBoxPython3_2_LIBS = $(VBOX_PYTHON32_LIB)
|
---|
288 |
|
---|
289 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
290 | ifdef VBOX_PYTHON32_LIB_X86
|
---|
291 | DLLS += VBoxPython3_2_x86
|
---|
292 | VBoxPython3_2_x86_EXTENDS = VBoxPythonBase_x86
|
---|
293 | VBoxPython3_2_x86_EXTENDS_BY = appending
|
---|
294 | VBoxPython3_2_x86_TEMPLATE = XPCOM
|
---|
295 | VBoxPython3_2_x86_INCS = $(VBOX_PYTHON32_INC)
|
---|
296 | VBoxPython3_2_x86_LIBS = $(VBOX_PYTHON32_LIB_X86)
|
---|
297 | endif
|
---|
298 | endif
|
---|
299 | endif
|
---|
300 |
|
---|
301 | ifdef VBOX_PYTHON32M_INC
|
---|
302 | #
|
---|
303 | # Python 3.2 version with pymalloc
|
---|
304 | #
|
---|
305 | DLLS += VBoxPython3_2m
|
---|
306 | VBoxPython3_2m_EXTENDS = VBoxPythonBase_m
|
---|
307 | VBoxPython3_2m_EXTENDS_BY = appending
|
---|
308 | VBoxPython3_2m_TEMPLATE = XPCOM
|
---|
309 | VBoxPython3_2m_INCS = $(VBOX_PYTHON32M_INC)
|
---|
310 | VBoxPython3_2m_LIBS = $(VBOX_PYTHON32M_LIB)
|
---|
311 | VBoxPython3_2m_DEFS = MODULE_NAME_SUFFIX
|
---|
312 |
|
---|
313 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
314 | ifdef VBOX_PYTHON32M_LIB_X86
|
---|
315 | DLLS += VBoxPython3_2m_x86
|
---|
316 | VBoxPython3_2m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
317 | VBoxPython3_2m_x86_EXTENDS_BY = appending
|
---|
318 | VBoxPython3_2m_x86_TEMPLATE = XPCOM
|
---|
319 | VBoxPython3_2m_x86_INCS = $(VBOX_PYTHON32M_INC)
|
---|
320 | VBoxPython3_2m_x86_LIBS = $(VBOX_PYTHON32M_LIB_X86)
|
---|
321 | endif
|
---|
322 | endif
|
---|
323 | endif
|
---|
324 |
|
---|
325 | ifndef VBOX_WITH_ONLY_PYTHON_LIMITED_API
|
---|
326 |
|
---|
327 | ifdef VBOX_PYTHON33_INC
|
---|
328 | #
|
---|
329 | # Python 3.3 version
|
---|
330 | #
|
---|
331 | DLLS += VBoxPython3_3
|
---|
332 | VBoxPython3_3_EXTENDS = VBoxPythonBase
|
---|
333 | VBoxPython3_3_EXTENDS_BY = appending
|
---|
334 | VBoxPython3_3_TEMPLATE = XPCOM
|
---|
335 | VBoxPython3_3_INCS = $(VBOX_PYTHON33_INC)
|
---|
336 | VBoxPython3_3_LIBS = $(VBOX_PYTHON33_LIB)
|
---|
337 |
|
---|
338 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
339 | ifdef VBOX_PYTHON33_LIB_X86
|
---|
340 | DLLS += VBoxPython3_3_x86
|
---|
341 | VBoxPython3_3_x86_EXTENDS = VBoxPythonBase_x86
|
---|
342 | VBoxPython3_3_x86_EXTENDS_BY = appending
|
---|
343 | VBoxPython3_3_x86_TEMPLATE = XPCOM
|
---|
344 | VBoxPython3_3_x86_INCS = $(VBOX_PYTHON33_INC)
|
---|
345 | VBoxPython3_3_x86_LIBS = $(VBOX_PYTHON33_LIB_X86)
|
---|
346 | endif
|
---|
347 | endif
|
---|
348 | endif
|
---|
349 |
|
---|
350 | ifdef VBOX_PYTHON33M_INC
|
---|
351 | #
|
---|
352 | # Python 3.3 version with pymalloc
|
---|
353 | #
|
---|
354 | DLLS += VBoxPython3_3m
|
---|
355 | VBoxPython3_3m_EXTENDS = VBoxPythonBase_m
|
---|
356 | VBoxPython3_3m_EXTENDS_BY = appending
|
---|
357 | VBoxPython3_3m_TEMPLATE = XPCOM
|
---|
358 | VBoxPython3_3m_INCS = $(VBOX_PYTHON33M_INC)
|
---|
359 | VBoxPython3_3m_LIBS = $(VBOX_PYTHON33M_LIB)
|
---|
360 |
|
---|
361 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
362 | ifdef VBOX_PYTHON33M_LIB_X86
|
---|
363 | DLLS += VBoxPython3_3m_x86
|
---|
364 | VBoxPython3_3m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
365 | VBoxPython3_3m_x86_EXTENDS_BY = appending
|
---|
366 | VBoxPython3_3m_x86_TEMPLATE = XPCOM
|
---|
367 | VBoxPython3_3m_x86_INCS = $(VBOX_PYTHON33M_INC)
|
---|
368 | VBoxPython3_3m_x86_LIBS = $(VBOX_PYTHON33M_LIB_X86)
|
---|
369 | endif
|
---|
370 | endif
|
---|
371 | endif
|
---|
372 |
|
---|
373 | ifdef VBOX_PYTHON34_INC
|
---|
374 | #
|
---|
375 | # Python 3.4 version
|
---|
376 | #
|
---|
377 | DLLS += VBoxPython3_4
|
---|
378 | VBoxPython3_4_EXTENDS = VBoxPythonBase
|
---|
379 | VBoxPython3_4_EXTENDS_BY = appending
|
---|
380 | VBoxPython3_4_TEMPLATE = XPCOM
|
---|
381 | VBoxPython3_4_INCS = $(VBOX_PYTHON34_INC)
|
---|
382 | VBoxPython3_4_LIBS = $(VBOX_PYTHON34_LIB)
|
---|
383 |
|
---|
384 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
385 | ifdef VBOX_PYTHON34_LIB_X86
|
---|
386 | DLLS += VBoxPython3_4_x86
|
---|
387 | VBoxPython3_4_x86_EXTENDS = VBoxPythonBase_x86
|
---|
388 | VBoxPython3_4_x86_EXTENDS_BY = appending
|
---|
389 | VBoxPython3_4_x86_TEMPLATE = XPCOM
|
---|
390 | VBoxPython3_4_x86_INCS = $(VBOX_PYTHON34_INC)
|
---|
391 | VBoxPython3_4_x86_LIBS = $(VBOX_PYTHON34_LIB_X86)
|
---|
392 | endif
|
---|
393 | endif
|
---|
394 | endif
|
---|
395 |
|
---|
396 | ifdef VBOX_PYTHON34M_INC
|
---|
397 | #
|
---|
398 | # Python 3.4 version with pymalloc
|
---|
399 | #
|
---|
400 | DLLS += VBoxPython3_4m
|
---|
401 | VBoxPython3_4m_EXTENDS = VBoxPythonBase_m
|
---|
402 | VBoxPython3_4m_EXTENDS_BY = appending
|
---|
403 | VBoxPython3_4m_TEMPLATE = XPCOM
|
---|
404 | VBoxPython3_4m_INCS = $(VBOX_PYTHON34M_INC)
|
---|
405 | VBoxPython3_4m_LIBS = $(VBOX_PYTHON34M_LIB)
|
---|
406 |
|
---|
407 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
408 | ifdef VBOX_PYTHON34M_LIB_X86
|
---|
409 | DLLS += VBoxPython3_4m_x86
|
---|
410 | VBoxPython3_4m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
411 | VBoxPython3_4m_x86_EXTENDS_BY = appending
|
---|
412 | VBoxPython3_4m_x86_TEMPLATE = XPCOM
|
---|
413 | VBoxPython3_4m_x86_INCS = $(VBOX_PYTHON34M_INC)
|
---|
414 | VBoxPython3_4m_x86_LIBS = $(VBOX_PYTHON34M_LIB_X86)
|
---|
415 | endif
|
---|
416 | endif
|
---|
417 | endif
|
---|
418 |
|
---|
419 | ifdef VBOX_PYTHON35_INC
|
---|
420 | #
|
---|
421 | # Python 3.5 version
|
---|
422 | #
|
---|
423 | DLLS += VBoxPython3_5
|
---|
424 | VBoxPython3_5_EXTENDS = VBoxPythonBase
|
---|
425 | VBoxPython3_5_EXTENDS_BY = appending
|
---|
426 | VBoxPython3_5_TEMPLATE = XPCOM
|
---|
427 | VBoxPython3_5_INCS = $(VBOX_PYTHON35_INC)
|
---|
428 | VBoxPython3_5_LIBS = $(VBOX_PYTHON35_LIB)
|
---|
429 |
|
---|
430 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
431 | ifdef VBOX_PYTHON35_LIB_X86
|
---|
432 | DLLS += VBoxPython3_5_x86
|
---|
433 | VBoxPython3_5_x86_EXTENDS = VBoxPythonBase_x86
|
---|
434 | VBoxPython3_5_x86_EXTENDS_BY = appending
|
---|
435 | VBoxPython3_5_x86_TEMPLATE = XPCOM
|
---|
436 | VBoxPython3_5_x86_INCS = $(VBOX_PYTHON35_INC)
|
---|
437 | VBoxPython3_5_x86_LIBS = $(VBOX_PYTHON35_LIB_X86)
|
---|
438 | endif
|
---|
439 | endif
|
---|
440 | endif
|
---|
441 |
|
---|
442 | ifdef VBOX_PYTHON35M_INC
|
---|
443 | #
|
---|
444 | # Python 3.5 version with pymalloc
|
---|
445 | #
|
---|
446 | DLLS += VBoxPython3_5m
|
---|
447 | VBoxPython3_5m_EXTENDS = VBoxPythonBase_m
|
---|
448 | VBoxPython3_5m_EXTENDS_BY = appending
|
---|
449 | VBoxPython3_5m_TEMPLATE = XPCOM
|
---|
450 | VBoxPython3_5m_INCS = $(VBOX_PYTHON35M_INC)
|
---|
451 | VBoxPython3_5m_LIBS = $(VBOX_PYTHON35M_LIB)
|
---|
452 |
|
---|
453 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
454 | ifdef VBOX_PYTHON35M_LIB_X86
|
---|
455 | DLLS += VBoxPython3_5m_x86
|
---|
456 | VBoxPython3_5m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
457 | VBoxPython3_5m_x86_EXTENDS_BY = appending
|
---|
458 | VBoxPython3_5m_x86_TEMPLATE = XPCOM
|
---|
459 | VBoxPython3_5m_x86_INCS = $(VBOX_PYTHON35M_INC)
|
---|
460 | VBoxPython3_5m_x86_LIBS = $(VBOX_PYTHON35M_LIB_X86)
|
---|
461 | endif
|
---|
462 | endif
|
---|
463 | endif
|
---|
464 |
|
---|
465 | ifdef VBOX_PYTHON36_INC
|
---|
466 | #
|
---|
467 | # Python 3.6 version
|
---|
468 | #
|
---|
469 | DLLS += VBoxPython3_6
|
---|
470 | VBoxPython3_6_EXTENDS = VBoxPythonBase
|
---|
471 | VBoxPython3_6_EXTENDS_BY = appending
|
---|
472 | VBoxPython3_6_TEMPLATE = XPCOM
|
---|
473 | VBoxPython3_6_INCS = $(VBOX_PYTHON36_INC)
|
---|
474 | VBoxPython3_6_LIBS = $(VBOX_PYTHON36_LIB)
|
---|
475 |
|
---|
476 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
477 | ifdef VBOX_PYTHON36_LIB_X86
|
---|
478 | DLLS += VBoxPython3_6_x86
|
---|
479 | VBoxPython3_6_x86_EXTENDS = VBoxPythonBase_x86
|
---|
480 | VBoxPython3_6_x86_EXTENDS_BY = appending
|
---|
481 | VBoxPython3_6_x86_TEMPLATE = XPCOM
|
---|
482 | VBoxPython3_6_x86_INCS = $(VBOX_PYTHON36_INC)
|
---|
483 | VBoxPython3_6_x86_LIBS = $(VBOX_PYTHON36_LIB_X86)
|
---|
484 | endif
|
---|
485 | endif
|
---|
486 | endif
|
---|
487 |
|
---|
488 | ifdef VBOX_PYTHON36M_INC
|
---|
489 | #
|
---|
490 | # Python 3.6 version with pymalloc
|
---|
491 | #
|
---|
492 | DLLS += VBoxPython3_6m
|
---|
493 | VBoxPython3_6m_EXTENDS = VBoxPythonBase_m
|
---|
494 | VBoxPython3_6m_EXTENDS_BY = appending
|
---|
495 | VBoxPython3_6m_TEMPLATE = XPCOM
|
---|
496 | VBoxPython3_6m_INCS = $(VBOX_PYTHON36M_INC)
|
---|
497 | VBoxPython3_6m_LIBS = $(VBOX_PYTHON36M_LIB)
|
---|
498 |
|
---|
499 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
500 | ifdef VBOX_PYTHON36M_LIB_X86
|
---|
501 | DLLS += VBoxPython3_6m_x86
|
---|
502 | VBoxPython3_6m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
503 | VBoxPython3_6m_x86_EXTENDS_BY = appending
|
---|
504 | VBoxPython3_6m_x86_TEMPLATE = XPCOM
|
---|
505 | VBoxPython3_6m_x86_INCS = $(VBOX_PYTHON36M_INC)
|
---|
506 | VBoxPython3_6m_x86_LIBS = $(VBOX_PYTHON36M_LIB_X86)
|
---|
507 | endif
|
---|
508 | endif
|
---|
509 | endif
|
---|
510 |
|
---|
511 | ifdef VBOX_PYTHON37_INC
|
---|
512 | #
|
---|
513 | # Python 3.7 version
|
---|
514 | #
|
---|
515 | DLLS += VBoxPython3_7
|
---|
516 | VBoxPython3_7_EXTENDS = VBoxPythonBase
|
---|
517 | VBoxPython3_7_EXTENDS_BY = appending
|
---|
518 | VBoxPython3_7_TEMPLATE = XPCOM
|
---|
519 | VBoxPython3_7_INCS = $(VBOX_PYTHON37_INC)
|
---|
520 | VBoxPython3_7_LIBS = $(VBOX_PYTHON37_LIB)
|
---|
521 |
|
---|
522 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
523 | ifdef VBOX_PYTHON37_LIB_X86
|
---|
524 | DLLS += VBoxPython3_7_x86
|
---|
525 | VBoxPython3_7_x86_EXTENDS = VBoxPythonBase_x86
|
---|
526 | VBoxPython3_7_x86_EXTENDS_BY = appending
|
---|
527 | VBoxPython3_7_x86_TEMPLATE = XPCOM
|
---|
528 | VBoxPython3_7_x86_INCS = $(VBOX_PYTHON37_INC)
|
---|
529 | VBoxPython3_7_x86_LIBS = $(VBOX_PYTHON37_LIB_X86)
|
---|
530 | endif
|
---|
531 | endif
|
---|
532 | endif
|
---|
533 |
|
---|
534 | ifdef VBOX_PYTHON37M_INC
|
---|
535 | #
|
---|
536 | # Python 3.7 version with pymalloc
|
---|
537 | #
|
---|
538 | DLLS += VBoxPython3_7m
|
---|
539 | VBoxPython3_7m_EXTENDS = VBoxPythonBase_m
|
---|
540 | VBoxPython3_7m_EXTENDS_BY = appending
|
---|
541 | VBoxPython3_7m_TEMPLATE = XPCOM
|
---|
542 | VBoxPython3_7m_INCS = $(VBOX_PYTHON37M_INC)
|
---|
543 | VBoxPython3_7m_LIBS = $(VBOX_PYTHON37M_LIB)
|
---|
544 |
|
---|
545 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
546 | ifdef VBOX_PYTHON37M_LIB_X86
|
---|
547 | DLLS += VBoxPython3_7m_x86
|
---|
548 | VBoxPython3_7m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
549 | VBoxPython3_7m_x86_EXTENDS_BY = appending
|
---|
550 | VBoxPython3_7m_x86_TEMPLATE_ = XPCOM
|
---|
551 | VBoxPython3_7m_x86_INCS = $(VBOX_PYTHON37M_INC)
|
---|
552 | VBoxPython3_7m_x86_LIBS = $(VBOX_PYTHON37M_LIB_X86)
|
---|
553 | endif
|
---|
554 | endif
|
---|
555 | endif
|
---|
556 |
|
---|
557 | ifdef VBOX_PYTHON38_INC
|
---|
558 | #
|
---|
559 | # Python 3.8 version
|
---|
560 | #
|
---|
561 | DLLS += VBoxPython3_8
|
---|
562 | VBoxPython3_8_EXTENDS = VBoxPythonBase
|
---|
563 | VBoxPython3_8_EXTENDS_BY = appending
|
---|
564 | VBoxPython3_8_TEMPLATE = XPCOM
|
---|
565 | VBoxPython3_8_INCS = $(VBOX_PYTHON38_INC)
|
---|
566 | VBoxPython3_8_LIBS = $(VBOX_PYTHON38_LIB)
|
---|
567 |
|
---|
568 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
569 | ifdef VBOX_PYTHON38_LIB_X86
|
---|
570 | DLLS += VBoxPython3_8_x86
|
---|
571 | VBoxPython3_8_x86_EXTENDS = VBoxPythonBase_x86
|
---|
572 | VBoxPython3_8_x86_EXTENDS_BY = appending
|
---|
573 | VBoxPython3_8_x86_TEMPLATE = XPCOM
|
---|
574 | VBoxPython3_8_x86_INCS = $(VBOX_PYTHON38_INC)
|
---|
575 | VBoxPython3_8_x86_LIBS = $(VBOX_PYTHON38_LIB_X86)
|
---|
576 | endif
|
---|
577 | endif
|
---|
578 | endif
|
---|
579 |
|
---|
580 | ifdef VBOX_PYTHON38M_INC
|
---|
581 | #
|
---|
582 | # Python 3.8 version with pymalloc
|
---|
583 | #
|
---|
584 | DLLS += VBoxPython3_8m
|
---|
585 | VBoxPython3_8m_EXTENDS = VBoxPythonBase_m
|
---|
586 | VBoxPython3_8m_EXTENDS_BY = appending
|
---|
587 | VBoxPython3_8m_TEMPLATE = XPCOM
|
---|
588 | VBoxPython3_8m_INCS = $(VBOX_PYTHON38M_INC)
|
---|
589 | VBoxPython3_8m_LIBS = $(VBOX_PYTHON38M_LIB)
|
---|
590 |
|
---|
591 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
592 | ifdef VBOX_PYTHON38M_LIB_X86
|
---|
593 | DLLS += VBoxPython3_8m_x86
|
---|
594 | VBoxPython3_8m_x86_EXTENDS = VBoxPythonBase_x86_m
|
---|
595 | VBoxPython3_8m_x86_EXTENDS_BY = appending
|
---|
596 | VBoxPython3_8m_x86_TEMPLATE_ = XPCOM
|
---|
597 | VBoxPython3_8m_x86_INCS = $(VBOX_PYTHON38M_INC)
|
---|
598 | VBoxPython3_8m_x86_LIBS = $(VBOX_PYTHON38M_LIB_X86)
|
---|
599 | endif
|
---|
600 | endif
|
---|
601 | endif
|
---|
602 |
|
---|
603 | ifdef VBOX_PYTHONDEF_INC
|
---|
604 | #
|
---|
605 | # Python without versioning
|
---|
606 | #
|
---|
607 | DLLS += VBoxPython
|
---|
608 | VBoxPython_EXTENDS = VBoxPythonBase
|
---|
609 | VBoxPython_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS))
|
---|
610 | VBoxPython_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHONDEF_INC)
|
---|
611 | if "$(KBUILD_TARGET)" == "linux"
|
---|
612 | VBoxPython_LIBS = $(VBoxPythonBase_LIBS)
|
---|
613 | else
|
---|
614 | VBoxPython_LIBS = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB)
|
---|
615 | endif
|
---|
616 |
|
---|
617 | ifdef VBOX_WITH_32_ON_64_MAIN_API
|
---|
618 | ifdef VBOX_PYTHONDEF_LIB_X86
|
---|
619 | VBoxPython_x86_EXTENDS = VBoxPythonBase_x86
|
---|
620 | VBoxPython_x86_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_x86_DEFS))
|
---|
621 | VBoxPython_x86_INCS = $(VBoxPythonBase_x86_INCS) $(VBOX_PYTHONDEF_INC)
|
---|
622 | if "$(KBUILD_TARGET)" == "linux"
|
---|
623 | VBoxPython_x86_LIBS = $(VBoxPythonBase_x86_LIBS)
|
---|
624 | else
|
---|
625 | VBoxPython_x86_LIBS = $(VBoxPythonBase_x86_LIBS) $(VBOX_PYTHONDEF_LIB_X86)
|
---|
626 | endif
|
---|
627 | endif
|
---|
628 | endif
|
---|
629 | endif
|
---|
630 |
|
---|
631 | endif # !VBOX_WITH_ONLY_PYTHON_LIMITED_API
|
---|
632 |
|
---|
633 | ifndef VBOX_WITHOUT_PYTHON_LIMITED_API
|
---|
634 | #
|
---|
635 | # If there is python 3.3 or later present, we can build a generic
|
---|
636 | # 3.x extension. Since 3.3 and 3.4 are rather old, we will pick
|
---|
637 | # those headers last.
|
---|
638 | #
|
---|
639 | # Note! No library dependencies are needed here (at least that's
|
---|
640 | # how the xxlimited.so demo extension is done on linux and darwin).
|
---|
641 | # Note! The 'm' ABI suffix was discontinued in 3.8.
|
---|
642 | # TODO: ASSUMING that we don't need a different headers for pymalloc
|
---|
643 | # ('m' builds < 3.8) and CRT malloc.
|
---|
644 | #
|
---|
645 | VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310 34 33 \
|
---|
646 | ,$(if-expr defined(VBOX_PYTHON$(ver)_INC),$(ver),)$(if-expr defined(VBOX_PYTHON$(ver)M_INC),$(ver)M,)))
|
---|
647 | ifneq ($(VBOX_PYTHON_LIMITED_API_VER),)
|
---|
648 | DLLS += VBoxPython3
|
---|
649 | VBoxPython3_EXTENDS = VBoxPythonBase
|
---|
650 | VBoxPython3_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) Py_LIMITED_API=0x03030000
|
---|
651 | VBoxPython3_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC)
|
---|
652 |
|
---|
653 | DLLS += VBoxPython3m
|
---|
654 | VBoxPython3m_EXTENDS = VBoxPythonBase_m
|
---|
655 | VBoxPython3m_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_m_DEFS)) Py_LIMITED_API=0x03030000
|
---|
656 | VBoxPython3m_INCS = $(VBoxPythonBase_m_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC)
|
---|
657 | endif
|
---|
658 | endif # VBOX_WITH_PYTHON_LIMITED_API
|
---|
659 |
|
---|
660 | endif # VBOX_ONLY_SDK
|
---|
661 |
|
---|
662 | #
|
---|
663 | # Install the python modules.
|
---|
664 | #
|
---|
665 | INSTALLS += VBoxPython-inst-py-xpcom
|
---|
666 | VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
|
---|
667 | VBoxPython-inst-py-xpcom_MODE = a+r,u+w
|
---|
668 | VBoxPython-inst-py-xpcom_SOURCES = \
|
---|
669 | vboxxpcom.py \
|
---|
670 | components.py \
|
---|
671 | file.py \
|
---|
672 | __init__.py \
|
---|
673 | nsError.py \
|
---|
674 | primitives.py \
|
---|
675 | xpcom_consts.py \
|
---|
676 | xpt.py \
|
---|
677 | client/__init__.py=>client/__init__.py \
|
---|
678 | server/__init__.py=>server/__init__.py \
|
---|
679 | server/enumerator.py=>server/enumerator.py \
|
---|
680 | server/factory.py=>server/factory.py \
|
---|
681 | server/loader.py=>server/loader.py \
|
---|
682 | server/module.py=>server/module.py \
|
---|
683 | server/policy.py=>server/policy.py
|
---|
684 |
|
---|
685 |
|
---|
686 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
687 |
|
---|