VirtualBox

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

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

xpcom18a4/Makefile.kmk,python/Makefile.kmk: disable printf warnings for VBoxPython* as the code contains a PyErr_Format calls that annoys gcc.

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