VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/python/Makefile.kmk@ 28511

Last change on this file since 28511 was 28370, checked in by vboxsync, 15 years ago

forgotten

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.6 KB
Line 
1# $Id: Makefile.kmk 28370 2010-04-15 14:52:55Z vboxsync $
2## @file
3# Sub-Makefile for Python bindings
4#
5
6#
7# Copyright (C) 2009 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25ifdef VBOX_WITH_MULTIVERSION_PYTHON
26VBOX_MULTIPYTHON = 1
27else
28VBOX_MULTIPYTHON = 0
29endif
30
31# list of supported Python versions
32$(eval $(patsubst %|,%$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON))))
33
34# Python Client Module - the C++/XPCOM bits.
35VBoxPythonBase_TEMPLATE = XPCOM
36VBoxPythonBase_DEFS = \
37 _IMPL_NS_COM \
38 _IMPL_NS_BASE \
39 EXPORT_XPTI_API \
40 EXPORT_XPT_API \
41 VBOX_PYXPCOM \
42 VBOX_WITH_XPCOM
43VBoxPythonBase_INCS = \
44 src
45VBoxPythonBase_CXXFLAGS = -Wno-write-strings
46
47VBoxPythonBase_SOURCES = \
48 src/module/_xpcom.cpp \
49 src/dllmain.cpp \
50 src/ErrorUtils.cpp \
51 src/PyGBase.cpp \
52 src/PyGInputStream.cpp \
53 src/PyGModule.cpp \
54 src/PyGStub.cpp \
55 src/PyGWeakReference.cpp \
56 src/PyIClassInfo.cpp \
57 src/PyIComponentManager.cpp \
58 src/PyIComponentManagerObsolete.cpp \
59 src/PyIEnumerator.cpp \
60 src/PyIID.cpp \
61 src/PyIInputStream.cpp \
62 src/PyIInterfaceInfo.cpp \
63 src/PyIInterfaceInfoManager.cpp \
64 src/PyISimpleEnumerator.cpp \
65 src/PyISupports.cpp \
66 src/PyIVariant.cpp \
67 src/Pyxpt_info.cpp \
68 src/TypeObject.cpp \
69 src/VariantUtils.cpp
70
71VBoxPythonBase_LIBS = \
72 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
73 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
74
75ifeq ($(KBUILD_TARGET),darwin)
76 ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so
77 VBoxPythonBase_DLLSUFF = .so
78endif
79
80# Python 2.3 version
81VBoxPython23_EXTENDS = VBoxPythonBase
82VBoxPython23_EXTENDS_BY = appending
83VBoxPython23_NAME = VBoxPython2_3
84VBoxPython23_TEMPLATE = XPCOM
85
86VBoxPython23_DEFS = VBOX_PYXPCOM_VERSIONED
87VBoxPython23_INCS = $(VBOX_PYTHON23_INC)
88VBoxPython23_LIBS = $(VBOX_PYTHON23_LIB)
89
90ifdef VBOX_PYTHON23_INC
91 KNOWN_GLUE += VBoxPython23
92endif
93
94# Python 2.4 version
95VBoxPython24_EXTENDS = VBoxPythonBase
96VBoxPython24_EXTENDS_BY = appending
97VBoxPython24_NAME = VBoxPython2_4
98VBoxPython24_TEMPLATE = XPCOM
99
100VBoxPython24_DEFS = VBOX_PYXPCOM_VERSIONED
101VBoxPython24_INCS = $(VBOX_PYTHON24_INC)
102VBoxPython24_LIBS = $(VBOX_PYTHON24_LIB)
103
104ifdef VBOX_PYTHON24_INC
105 KNOWN_GLUE += VBoxPython24
106endif
107
108# Python 2.5 version
109VBoxPython25_EXTENDS = VBoxPythonBase
110VBoxPython25_EXTENDS_BY = appending
111VBoxPython25_NAME = VBoxPython2_5
112if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
113 VBoxPython25_TEMPLATE = XPCOMOSX105
114else
115 VBoxPython25_TEMPLATE = XPCOM
116endif
117
118VBoxPython25_DEFS = VBOX_PYXPCOM_VERSIONED
119VBoxPython25_INCS = $(VBOX_PYTHON25_INC)
120VBoxPython25_LIBS = $(VBOX_PYTHON25_LIB)
121
122ifdef VBOX_PYTHON25_INC
123 KNOWN_GLUE += VBoxPython25
124endif
125
126# Python 2.6 version
127VBoxPython26_EXTENDS = VBoxPythonBase
128VBoxPython26_EXTENDS_BY = appending
129VBoxPython26_NAME = VBoxPython2_6
130if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
131 VBoxPython26_TEMPLATE = XPCOMOSX105
132else
133 VBoxPython26_TEMPLATE = XPCOM
134endif
135
136VBoxPython26_DEFS = VBOX_PYXPCOM_VERSIONED
137VBoxPython26_INCS = $(VBOX_PYTHON26_INC)
138VBoxPython26_LIBS = $(VBOX_PYTHON26_LIB)
139
140ifdef VBOX_PYTHON26_INC
141 KNOWN_GLUE += VBoxPython26
142endif
143
144# Python 2.7 version
145VBoxPython27_EXTENDS = VBoxPythonBase
146VBoxPython27_EXTENDS_BY = appending
147VBoxPython27_NAME = VBoxPython2_7
148VBoxPython27_TEMPLATE = XPCOM
149
150VBoxPython27_DEFS = VBOX_PYXPCOM_VERSIONED
151VBoxPython27_INCS = $(VBOX_PYTHON27_INC)
152VBoxPython27_LIBS = $(VBOX_PYTHON27_LIB)
153
154ifdef VBOX_PYTHON27_INC
155 KNOWN_GLUE += VBoxPython27
156endif
157
158# Python 2.8 version
159VBoxPython28_EXTENDS = VBoxPythonBase
160VBoxPython28_EXTENDS_BY = appending
161VBoxPython28_NAME = VBoxPython2_8
162VBoxPython28_TEMPLATE = XPCOM
163
164VBoxPython28_DEFS = VBOX_PYXPCOM_VERSIONED
165VBoxPython28_INCS = $(VBOX_PYTHON28_INC)
166VBoxPython28_LIBS = $(VBOX_PYTHON28_LIB)
167
168ifdef VBOX_PYTHON28_INC
169 KNOWN_GLUE += VBoxPython28
170endif
171
172# Python without versioning
173VBoxPython_EXTENDS = VBoxPythonBase
174VBoxPython_EXTENDS_BY = appending
175VBoxPython_TEMPLATE = XPCOM
176
177VBoxPython_INCS = $(VBOX_PYTHONDEF_INC)
178if "$(KBUILD_TARGET)" == "linux"
179 VBoxPython_LIBS =
180else
181 VBoxPython_LIBS = $(VBOX_PYTHONDEF_LIB)
182endif
183
184ifdef VBOX_PYTHONDEF_INC
185 KNOWN_GLUE += VBoxPython
186endif
187
188VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
189VBoxPython-inst-py-xpcom_SOURCES = \
190 vboxxpcom.py \
191 components.py \
192 file.py \
193 __init__.py \
194 nsError.py \
195 primitives.py \
196 xpcom_consts.py \
197 xpt.py \
198 client/__init__.py=>client/__init__.py \
199 server/__init__.py=>server/__init__.py \
200 server/enumerator.py=>server/enumerator.py \
201 server/factory.py=>server/factory.py \
202 server/loader.py=>server/loader.py \
203 server/module.py=>server/module.py \
204 server/policy.py=>server/policy.py
205
206
207ifndef VBOX_ONLY_SDK
208 DLLS += $(KNOWN_GLUE)
209endif
210
211INSTALLS += VBoxPython-inst-py-xpcom
212
213include $(KBUILD_PATH)/subfooter.kmk
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette