1 | # $Id: Makefile.kmk 20971 2009-06-26 13:43:58Z 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 | VBoxPython25_LDFLAGS.darwin = -install_name /Users/vbox/nike/ws/out/darwin.x86/debug/dist/VirtualBox.app/Contents/MacOS/VBoxPython2_5.so
|
---|
106 | #VBoxPython25_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxPython2_5.so
|
---|
107 |
|
---|
108 | VBoxPython25_DEFS = VBOX_PYXPCOM_VERSIONED
|
---|
109 | VBoxPython25_INCS = $(VBOX_PYTHON25_INC)
|
---|
110 | VBoxPython25_LIBS = $(VBOX_PYTHON25_LIB)
|
---|
111 |
|
---|
112 | ifdef VBOX_PYTHON25_INC
|
---|
113 | KNOWN_GLUE += VBoxPython25
|
---|
114 | endif
|
---|
115 |
|
---|
116 | # Python 2.6 version
|
---|
117 | VBoxPython26_EXTENDS = VBoxPythonBase
|
---|
118 | VBoxPython26_EXTENDS_BY = appending
|
---|
119 | VBoxPython26_NAME = VBoxPython2_6
|
---|
120 | VBoxPython26_TEMPLATE = XPCOM
|
---|
121 |
|
---|
122 | VBoxPython26_DEFS = VBOX_PYXPCOM_VERSIONED
|
---|
123 | VBoxPython26_INCS = $(VBOX_PYTHON26_INC)
|
---|
124 | VBoxPython26_LIBS = $(VBOX_PYTHON26_LIB)
|
---|
125 |
|
---|
126 | ifdef VBOX_PYTHON26_INC
|
---|
127 | KNOWN_GLUE += VBoxPython26
|
---|
128 | endif
|
---|
129 |
|
---|
130 | # Python 2.7 version
|
---|
131 | VBoxPython27_EXTENDS = VBoxPythonBase
|
---|
132 | VBoxPython27_EXTENDS_BY = appending
|
---|
133 | VBoxPython27_NAME = VBoxPython2_7
|
---|
134 | VBoxPython27_TEMPLATE = XPCOM
|
---|
135 |
|
---|
136 | VBoxPython27_DEFS = VBOX_PYXPCOM_VERSIONED
|
---|
137 | VBoxPython27_INCS = $(VBOX_PYTHON27_INC)
|
---|
138 | VBoxPython27_LIBS = $(VBOX_PYTHON27_LIB)
|
---|
139 |
|
---|
140 | ifdef VBOX_PYTHON27_INC
|
---|
141 | KNOWN_GLUE += VBoxPython27
|
---|
142 | endif
|
---|
143 |
|
---|
144 | # Python 2.8 version
|
---|
145 | VBoxPython28_EXTENDS = VBoxPythonBase
|
---|
146 | VBoxPython28_EXTENDS_BY = appending
|
---|
147 | VBoxPython28_NAME = VBoxPython2_8
|
---|
148 | VBoxPython28_TEMPLATE = XPCOM
|
---|
149 |
|
---|
150 | VBoxPython28_DEFS = VBOX_PYXPCOM_VERSIONED
|
---|
151 | VBoxPython28_INCS = $(VBOX_PYTHON28_INC)
|
---|
152 | VBoxPython28_LIBS = $(VBOX_PYTHON28_LIB)
|
---|
153 |
|
---|
154 | ifdef VBOX_PYTHON28_INC
|
---|
155 | KNOWN_GLUE += VBoxPython28
|
---|
156 | endif
|
---|
157 |
|
---|
158 | # Python without versioning
|
---|
159 | VBoxPython_EXTENDS = VBoxPythonBase
|
---|
160 | VBoxPython_EXTENDS_BY = appending
|
---|
161 | VBoxPython_TEMPLATE = XPCOM
|
---|
162 |
|
---|
163 | VBoxPython_INCS = $(VBOX_PYTHONDEF_INC)
|
---|
164 | if "$(KBUILD_TARGET)" == "linux"
|
---|
165 | VBoxPython_LIBS =
|
---|
166 | else
|
---|
167 | VBoxPython_LIBS = $(VBOX_PYTHONDEF_LIB)
|
---|
168 | endif
|
---|
169 |
|
---|
170 | ifdef VBOX_PYTHONDEF_INC
|
---|
171 | KNOWN_GLUE += VBoxPython
|
---|
172 | endif
|
---|
173 |
|
---|
174 | VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
|
---|
175 | VBoxPython-inst-py-xpcom_SOURCES = \
|
---|
176 | vboxxpcom.py \
|
---|
177 | components.py \
|
---|
178 | file.py \
|
---|
179 | __init__.py \
|
---|
180 | nsError.py \
|
---|
181 | primitives.py \
|
---|
182 | xpcom_consts.py \
|
---|
183 | xpt.py \
|
---|
184 | client/__init__.py=>client/__init__.py \
|
---|
185 | server/__init__.py=>server/__init__.py \
|
---|
186 | server/enumerator.py=>server/enumerator.py \
|
---|
187 | server/factory.py=>server/factory.py \
|
---|
188 | server/loader.py=>server/loader.py \
|
---|
189 | server/module.py=>server/module.py \
|
---|
190 | server/policy.py=>server/policy.py
|
---|
191 |
|
---|
192 |
|
---|
193 | ifndef VBOX_ONLY_SDK
|
---|
194 | DLLS += $(KNOWN_GLUE)
|
---|
195 | endif
|
---|
196 |
|
---|
197 | INSTALLS += VBoxPython-inst-py-xpcom
|
---|
198 |
|
---|
199 | include $(KBUILD_PATH)/subfooter.kmk
|
---|