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