VirtualBox

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

Last change on this file since 39795 was 39795, checked in by vboxsync, 13 years ago

python/xpcom: disabled live time debugging in debug build.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 KB
Line 
1# $Id: Makefile.kmk 39795 2012-01-18 15:42:53Z vboxsync $
2## @file
3# Sub-Makefile for Python bindings
4#
5
6#
7# Copyright (C) 2009-2010 Oracle Corporation
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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21ifdef VBOX_WITH_MULTIVERSION_PYTHON
22 VBOX_MULTIPYTHON = 1
23else
24 VBOX_MULTIPYTHON = 0
25endif
26
27#
28# List of supported Python versions, defining a number of
29# VBOX_PYTHON[25|26|27|28|DEF]_[INC|LIB] variables which get picked up below.
30#
31ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
32 ifeq ($(KBUILD_TARGET_ARCH),x86)
33 VBOX_PYTHON25_INC = $(VBOX_PATH_MACOSX_SDK)/usr/include/python2.5
34 VBOX_PYTHON25_LIB = $(VBOX_PATH_MACOSX_SDK)/usr/lib/libpython2.5.dylib
35 endif
36 if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
37 && ( !defined(VBOX_OSE) \
38 || "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
39 VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/include/python2.6
40 VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib
41 endif
42 if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7) \
43 && ( defined(VBOX_NOT_OSE_LATER_SOMETIME) \
44 || "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
45 VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/include/python2.7
46 VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib
47 endif
48
49else
50 # Use the script.
51 $(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) \
52 $(PATH_SUB_CURRENT)/gen_python_deps.py \
53 $(KBUILD_TARGET) \
54 $(KBUILD_TARGET_ARCH) \
55 $(VBOX_MULTIPYTHON) )))
56endif
57
58ifndef VBOX_ONLY_SDK
59
60#
61# Base Python Client Module - the C++/XPCOM bits (not actually built).
62#
63VBoxPythonBase_TEMPLATE = XPCOM
64VBoxPythonBase_CXXFLAGS = -Wno-write-strings
65VBoxPythonBase_DLLSUFF.darwin = .so
66VBoxPythonBase_DEFS = \
67 _IMPL_NS_COM \
68 _IMPL_NS_BASE \
69 EXPORT_XPTI_API \
70 EXPORT_XPT_API \
71 VBOX_PYXPCOM \
72 VBOX_WITH_XPCOM \
73 VBOX_PYXPCOM_VERSIONED
74#VBoxPythonBase_DEFS.debug = \
75# VBOX_DEBUG_LIFETIMES
76VBoxPythonBase_INCS = \
77 src
78VBoxPythonBase_SOURCES = \
79 src/module/_xpcom.cpp \
80 src/dllmain.cpp \
81 src/ErrorUtils.cpp \
82 src/PyGBase.cpp \
83 src/PyGInputStream.cpp \
84 src/PyGModule.cpp \
85 src/PyGStub.cpp \
86 src/PyGWeakReference.cpp \
87 src/PyIClassInfo.cpp \
88 src/PyIComponentManager.cpp \
89 src/PyIComponentManagerObsolete.cpp \
90 src/PyIEnumerator.cpp \
91 src/PyIID.cpp \
92 src/PyIInputStream.cpp \
93 src/PyIInterfaceInfo.cpp \
94 src/PyIInterfaceInfoManager.cpp \
95 src/PyISimpleEnumerator.cpp \
96 src/PyISupports.cpp \
97 src/PyIVariant.cpp \
98 src/Pyxpt_info.cpp \
99 src/TypeObject.cpp \
100 src/VariantUtils.cpp
101VBoxPythonBase_LIBS = \
102 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
103 $(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
104
105
106ifdef VBOX_PYTHON23_INC
107#
108# Python 2.3 version
109#
110DLLS += VBoxPython2_3
111VBoxPython2_3_EXTENDS = VBoxPythonBase
112VBoxPython2_3_EXTENDS_BY = appending
113VBoxPython2_3_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,)
114VBoxPython2_3_INCS = $(VBOX_PYTHON23_INC)
115VBoxPython2_3_LIBS = $(VBOX_PYTHON23_LIB)
116endif
117
118ifdef VBOX_PYTHON24_INC
119#
120# Python 2.4 version
121#
122DLLS += VBoxPython2_4
123VBoxPython2_4_EXTENDS = VBoxPythonBase
124VBoxPython2_4_EXTENDS_BY = appending
125VBoxPython2_4_INCS = $(VBOX_PYTHON24_INC)
126VBoxPython2_4_LIBS = $(VBOX_PYTHON24_LIB)
127endif
128
129ifdef VBOX_PYTHON25_INC
130#
131# Python 2.5 version
132#
133DLLS += VBoxPython2_5
134VBoxPython2_5_EXTENDS = VBoxPythonBase
135VBoxPython2_5_EXTENDS_BY = appending
136VBoxPython2_5_TEMPLATE = XPCOM
137VBoxPython2_5_INCS = $(VBOX_PYTHON25_INC)
138VBoxPython2_5_LIBS = $(VBOX_PYTHON25_LIB)
139endif
140
141ifdef VBOX_PYTHON26_INC
142#
143# Python 2.6 version
144#
145DLLS += VBoxPython2_6
146VBoxPython2_6_EXTENDS = VBoxPythonBase
147VBoxPython2_6_EXTENDS_BY = appending
148VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,)
149VBoxPython2_6_INCS = $(VBOX_PYTHON26_INC)
150VBoxPython2_6_LIBS = $(VBOX_PYTHON26_LIB)
151endif
152
153ifdef VBOX_PYTHON27_INC
154#
155# Python 2.7 version
156#
157DLLS += VBoxPython2_7
158VBoxPython2_7_EXTENDS = VBoxPythonBase
159VBoxPython2_7_EXTENDS_BY = appending
160VBoxPython2_7_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX107,)
161VBoxPython2_7_INCS = $(VBOX_PYTHON27_INC)
162VBoxPython2_7_LIBS = $(VBOX_PYTHON27_LIB)
163endif
164
165ifdef VBOX_PYTHON28_INC
166#
167# Python 2.8 version
168#
169DLLS += VBoxPython2_8
170VBoxPython2_8_EXTENDS = VBoxPythonBase
171VBoxPython2_8_EXTENDS_BY = appending
172VBoxPython2_8_INCS = $(VBOX_PYTHON28_INC)
173VBoxPython2_8_LIBS = $(VBOX_PYTHON28_LIB)
174endif
175
176ifdef VBOX_PYTHONDEF_INC
177#
178# Python without versioning
179#
180DLLS += VBoxPython
181VBoxPython_EXTENDS = VBoxPythonBase
182VBoxPython_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS))
183VBoxPython_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHONDEF_INC)
184if "$(KBUILD_TARGET)" == "linux"
185 VBoxPython_LIBS = $(VBoxPythonBase_LIBS)
186else
187 VBoxPython_LIBS = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB)
188endif
189endif
190
191endif # VBOX_ONLY_SDK
192
193#
194# Install the python modules.
195#
196INSTALLS += VBoxPython-inst-py-xpcom
197VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
198VBoxPython-inst-py-xpcom_MODE = a+r,u+w
199VBoxPython-inst-py-xpcom_SOURCES = \
200 vboxxpcom.py \
201 components.py \
202 file.py \
203 __init__.py \
204 nsError.py \
205 primitives.py \
206 xpcom_consts.py \
207 xpt.py \
208 client/__init__.py=>client/__init__.py \
209 server/__init__.py=>server/__init__.py \
210 server/enumerator.py=>server/enumerator.py \
211 server/factory.py=>server/factory.py \
212 server/loader.py=>server/loader.py \
213 server/module.py=>server/module.py \
214 server/policy.py=>server/policy.py
215
216
217include $(KBUILD_PATH)/subfooter.kmk
218
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