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