VirtualBox

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

Last change on this file since 26526 was 26022, checked in by vboxsync, 15 years ago

xpcom18a4: Deprecated warnings in VBoxPython, take two.

  • 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 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
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 = \
31 _IMPL_NS_COM \
32 _IMPL_NS_BASE \
33 EXPORT_XPTI_API \
34 EXPORT_XPT_API \
35 VBOX_PYXPCOM \
36 VBOX_WITH_XPCOM
37VBoxPythonBase_INCS = \
38 src
39VBoxPythonBase_CXXFLAGS = -Wno-write-strings
40
41VBoxPythonBase_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
65VBoxPythonBase_LIBS = \
66 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
67 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
68
69ifeq ($(KBUILD_TARGET),darwin)
70 ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so
71 VBoxPythonBase_DLLSUFF = .so
72endif
73
74# Python 2.3 version
75VBoxPython23_EXTENDS = VBoxPythonBase
76VBoxPython23_EXTENDS_BY = appending
77VBoxPython23_NAME = VBoxPython2_3
78VBoxPython23_TEMPLATE = XPCOM
79
80VBoxPython23_DEFS = VBOX_PYXPCOM_VERSIONED
81VBoxPython23_INCS = $(VBOX_PYTHON23_INC)
82VBoxPython23_LIBS = $(VBOX_PYTHON23_LIB)
83
84ifdef VBOX_PYTHON23_INC
85 KNOWN_GLUE += VBoxPython23
86endif
87
88# Python 2.4 version
89VBoxPython24_EXTENDS = VBoxPythonBase
90VBoxPython24_EXTENDS_BY = appending
91VBoxPython24_NAME = VBoxPython2_4
92VBoxPython24_TEMPLATE = XPCOM
93
94VBoxPython24_DEFS = VBOX_PYXPCOM_VERSIONED
95VBoxPython24_INCS = $(VBOX_PYTHON24_INC)
96VBoxPython24_LIBS = $(VBOX_PYTHON24_LIB)
97
98ifdef VBOX_PYTHON24_INC
99 KNOWN_GLUE += VBoxPython24
100endif
101
102# Python 2.5 version
103VBoxPython25_EXTENDS = VBoxPythonBase
104VBoxPython25_EXTENDS_BY = appending
105VBoxPython25_NAME = VBoxPython2_5
106if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
107 VBoxPython25_TEMPLATE = XPCOMOSX105
108else
109 VBoxPython25_TEMPLATE = XPCOM
110endif
111
112VBoxPython25_DEFS = VBOX_PYXPCOM_VERSIONED
113VBoxPython25_INCS = $(VBOX_PYTHON25_INC)
114VBoxPython25_LIBS = $(VBOX_PYTHON25_LIB)
115
116ifdef VBOX_PYTHON25_INC
117 KNOWN_GLUE += VBoxPython25
118endif
119
120# Python 2.6 version
121VBoxPython26_EXTENDS = VBoxPythonBase
122VBoxPython26_EXTENDS_BY = appending
123VBoxPython26_NAME = VBoxPython2_6
124if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86"
125 VBoxPython26_TEMPLATE = XPCOMOSX105
126else
127 VBoxPython26_TEMPLATE = XPCOM
128endif
129
130VBoxPython26_DEFS = VBOX_PYXPCOM_VERSIONED
131VBoxPython26_INCS = $(VBOX_PYTHON26_INC)
132VBoxPython26_LIBS = $(VBOX_PYTHON26_LIB)
133
134ifdef VBOX_PYTHON26_INC
135 KNOWN_GLUE += VBoxPython26
136endif
137
138# Python 2.7 version
139VBoxPython27_EXTENDS = VBoxPythonBase
140VBoxPython27_EXTENDS_BY = appending
141VBoxPython27_NAME = VBoxPython2_7
142VBoxPython27_TEMPLATE = XPCOM
143
144VBoxPython27_DEFS = VBOX_PYXPCOM_VERSIONED
145VBoxPython27_INCS = $(VBOX_PYTHON27_INC)
146VBoxPython27_LIBS = $(VBOX_PYTHON27_LIB)
147
148ifdef VBOX_PYTHON27_INC
149 KNOWN_GLUE += VBoxPython27
150endif
151
152# Python 2.8 version
153VBoxPython28_EXTENDS = VBoxPythonBase
154VBoxPython28_EXTENDS_BY = appending
155VBoxPython28_NAME = VBoxPython2_8
156VBoxPython28_TEMPLATE = XPCOM
157
158VBoxPython28_DEFS = VBOX_PYXPCOM_VERSIONED
159VBoxPython28_INCS = $(VBOX_PYTHON28_INC)
160VBoxPython28_LIBS = $(VBOX_PYTHON28_LIB)
161
162ifdef VBOX_PYTHON28_INC
163 KNOWN_GLUE += VBoxPython28
164endif
165
166# Python without versioning
167VBoxPython_EXTENDS = VBoxPythonBase
168VBoxPython_EXTENDS_BY = appending
169VBoxPython_TEMPLATE = XPCOM
170
171VBoxPython_INCS = $(VBOX_PYTHONDEF_INC)
172if "$(KBUILD_TARGET)" == "linux"
173 VBoxPython_LIBS =
174else
175 VBoxPython_LIBS = $(VBOX_PYTHONDEF_LIB)
176endif
177
178ifdef VBOX_PYTHONDEF_INC
179 KNOWN_GLUE += VBoxPython
180endif
181
182VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
183VBoxPython-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
201ifndef VBOX_ONLY_SDK
202 DLLS += $(KNOWN_GLUE)
203endif
204
205INSTALLS += VBoxPython-inst-py-xpcom
206
207include $(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