VirtualBox

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

Last change on this file since 22692 was 21240, checked in by vboxsync, 15 years ago

Python: use 10.5 SDK for 2.6 bridge on Darwin too

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 KB
Line 
1# $Id: Makefile.kmk 21240 2009-07-06 08:35:59Z 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
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.
29VBoxPythonBase_TEMPLATE = XPCOM
30VBoxPythonBase_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API \
31 EXPORT_XPT_API VBOX_PYXPCOM VBOX_WITH_XPCOM
32VBoxPythonBase_INCS = \
33 src \
34
35VBoxPythonBase_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
59VBoxPythonBase_LIBS = \
60 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
61 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
62
63ifeq ($(KBUILD_TARGET),darwin)
64 ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so
65 VBoxPythonBase_DLLSUFF = .so
66endif
67
68# Python 2.3 version
69VBoxPython23_EXTENDS = VBoxPythonBase
70VBoxPython23_EXTENDS_BY = appending
71VBoxPython23_NAME = VBoxPython2_3
72VBoxPython23_TEMPLATE = XPCOM
73
74VBoxPython23_DEFS = VBOX_PYXPCOM_VERSIONED
75VBoxPython23_INCS = $(VBOX_PYTHON23_INC)
76VBoxPython23_LIBS = $(VBOX_PYTHON23_LIB)
77
78ifdef VBOX_PYTHON23_INC
79 KNOWN_GLUE += VBoxPython23
80endif
81
82# Python 2.4 version
83VBoxPython24_EXTENDS = VBoxPythonBase
84VBoxPython24_EXTENDS_BY = appending
85VBoxPython24_NAME = VBoxPython2_4
86VBoxPython24_TEMPLATE = XPCOM
87
88VBoxPython24_DEFS = VBOX_PYXPCOM_VERSIONED
89VBoxPython24_INCS = $(VBOX_PYTHON24_INC)
90VBoxPython24_LIBS = $(VBOX_PYTHON24_LIB)
91
92ifdef VBOX_PYTHON24_INC
93 KNOWN_GLUE += VBoxPython24
94endif
95
96# Python 2.5 version
97VBoxPython25_EXTENDS = VBoxPythonBase
98VBoxPython25_EXTENDS_BY = appending
99VBoxPython25_NAME = VBoxPython2_5
100if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
101 VBoxPython25_TEMPLATE = XPCOMOSX105
102else
103 VBoxPython25_TEMPLATE = XPCOM
104endif
105
106VBoxPython25_DEFS = VBOX_PYXPCOM_VERSIONED
107VBoxPython25_INCS = $(VBOX_PYTHON25_INC)
108VBoxPython25_LIBS = $(VBOX_PYTHON25_LIB)
109
110ifdef VBOX_PYTHON25_INC
111 KNOWN_GLUE += VBoxPython25
112endif
113
114# Python 2.6 version
115VBoxPython26_EXTENDS = VBoxPythonBase
116VBoxPython26_EXTENDS_BY = appending
117VBoxPython26_NAME = VBoxPython2_6
118if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
119 VBoxPython26_TEMPLATE = XPCOMOSX105
120else
121 VBoxPython26_TEMPLATE = XPCOM
122endif
123
124VBoxPython26_DEFS = VBOX_PYXPCOM_VERSIONED
125VBoxPython26_INCS = $(VBOX_PYTHON26_INC)
126VBoxPython26_LIBS = $(VBOX_PYTHON26_LIB)
127
128ifdef VBOX_PYTHON26_INC
129 KNOWN_GLUE += VBoxPython26
130endif
131
132# Python 2.7 version
133VBoxPython27_EXTENDS = VBoxPythonBase
134VBoxPython27_EXTENDS_BY = appending
135VBoxPython27_NAME = VBoxPython2_7
136VBoxPython27_TEMPLATE = XPCOM
137
138VBoxPython27_DEFS = VBOX_PYXPCOM_VERSIONED
139VBoxPython27_INCS = $(VBOX_PYTHON27_INC)
140VBoxPython27_LIBS = $(VBOX_PYTHON27_LIB)
141
142ifdef VBOX_PYTHON27_INC
143 KNOWN_GLUE += VBoxPython27
144endif
145
146# Python 2.8 version
147VBoxPython28_EXTENDS = VBoxPythonBase
148VBoxPython28_EXTENDS_BY = appending
149VBoxPython28_NAME = VBoxPython2_8
150VBoxPython28_TEMPLATE = XPCOM
151
152VBoxPython28_DEFS = VBOX_PYXPCOM_VERSIONED
153VBoxPython28_INCS = $(VBOX_PYTHON28_INC)
154VBoxPython28_LIBS = $(VBOX_PYTHON28_LIB)
155
156ifdef VBOX_PYTHON28_INC
157 KNOWN_GLUE += VBoxPython28
158endif
159
160# Python without versioning
161VBoxPython_EXTENDS = VBoxPythonBase
162VBoxPython_EXTENDS_BY = appending
163VBoxPython_TEMPLATE = XPCOM
164
165VBoxPython_INCS = $(VBOX_PYTHONDEF_INC)
166if "$(KBUILD_TARGET)" == "linux"
167 VBoxPython_LIBS =
168else
169 VBoxPython_LIBS = $(VBOX_PYTHONDEF_LIB)
170endif
171
172ifdef VBOX_PYTHONDEF_INC
173 KNOWN_GLUE += VBoxPython
174endif
175
176VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
177VBoxPython-inst-py-xpcom_SOURCES = \
178 vboxxpcom.py \
179 components.py \
180 file.py \
181 __init__.py \
182 nsError.py \
183 primitives.py \
184 xpcom_consts.py \
185 xpt.py \
186 client/__init__.py=>client/__init__.py \
187 server/__init__.py=>server/__init__.py \
188 server/enumerator.py=>server/enumerator.py \
189 server/factory.py=>server/factory.py \
190 server/loader.py=>server/loader.py \
191 server/module.py=>server/module.py \
192 server/policy.py=>server/policy.py
193
194
195ifndef VBOX_ONLY_SDK
196 DLLS += $(KNOWN_GLUE)
197endif
198
199INSTALLS += VBoxPython-inst-py-xpcom
200
201include $(KBUILD_PATH)/subfooter.kmk
Note: See TracBrowser for help on using the repository browser.

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