VirtualBox

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

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

*.kmk: Installation/staging adjustments (kBuild 0.2.0 preps).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.3 KB
Line 
1# $Id: Makefile.kmk 38082 2011-07-20 14:26:24Z 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#
31$(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON))))
32
33ifndef VBOX_ONLY_SDK
34
35#
36# Base Python Client Module - the C++/XPCOM bits (not actually built).
37#
38VBoxPythonBase_TEMPLATE = XPCOM
39VBoxPythonBase_CXXFLAGS = -Wno-write-strings
40VBoxPythonBase_DLLSUFF.darwin = .so
41VBoxPythonBase_DEFS = \
42 _IMPL_NS_COM \
43 _IMPL_NS_BASE \
44 EXPORT_XPTI_API \
45 EXPORT_XPT_API \
46 VBOX_PYXPCOM \
47 VBOX_WITH_XPCOM \
48 VBOX_PYXPCOM_VERSIONED
49VBoxPythonBase_INCS = \
50 src
51VBoxPythonBase_SOURCES = \
52 src/module/_xpcom.cpp \
53 src/dllmain.cpp \
54 src/ErrorUtils.cpp \
55 src/PyGBase.cpp \
56 src/PyGInputStream.cpp \
57 src/PyGModule.cpp \
58 src/PyGStub.cpp \
59 src/PyGWeakReference.cpp \
60 src/PyIClassInfo.cpp \
61 src/PyIComponentManager.cpp \
62 src/PyIComponentManagerObsolete.cpp \
63 src/PyIEnumerator.cpp \
64 src/PyIID.cpp \
65 src/PyIInputStream.cpp \
66 src/PyIInterfaceInfo.cpp \
67 src/PyIInterfaceInfoManager.cpp \
68 src/PyISimpleEnumerator.cpp \
69 src/PyISupports.cpp \
70 src/PyIVariant.cpp \
71 src/Pyxpt_info.cpp \
72 src/TypeObject.cpp \
73 src/VariantUtils.cpp
74VBoxPythonBase_LIBS = \
75 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
76 $(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
77
78
79if defined(VBOX_PYTHON23_INC) \
80 && ("$(KBUILD_TARGET)" != "darwin" || ("$(KBUILD_TARGET_ARCH)" == "x86" && defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT) ))
81#
82# Python 2.3 version
83#
84DLLS += VBoxPython2_3
85VBoxPython2_3_EXTENDS = VBoxPythonBase
86VBoxPython2_3_EXTENDS_BY = appending
87VBoxPython2_3_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,)
88VBoxPython2_3_INCS = $(VBOX_PYTHON23_INC)
89VBoxPython2_3_LIBS = $(VBOX_PYTHON23_LIB)
90endif
91
92if defined(VBOX_PYTHON24_INC) && "$(KBUILD_TARGET)" != "darwin"
93#
94# Python 2.4 version
95#
96DLLS += VBoxPython2_4
97VBoxPython2_4_EXTENDS = VBoxPythonBase
98VBoxPython2_4_EXTENDS_BY = appending
99VBoxPython2_4_INCS = $(VBOX_PYTHON24_INC)
100VBoxPython2_4_LIBS = $(VBOX_PYTHON24_LIB)
101endif
102
103if defined(VBOX_PYTHON25_INC) \
104 && ("$(KBUILD_TARGET)" != "darwin" || ("$(KBUILD_TARGET_ARCH)" == "x86" && "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.5"))
105#
106# Python 2.5 version
107#
108DLLS += VBoxPython2_5
109VBoxPython2_5_EXTENDS = VBoxPythonBase
110VBoxPython2_5_EXTENDS_BY = appending
111VBoxPython2_5_TEMPLATE = XPCOM
112VBoxPython2_5_INCS = $(VBOX_PYTHON25_INC)
113VBoxPython2_5_LIBS = $(VBOX_PYTHON25_LIB)
114endif
115
116if defined(VBOX_PYTHON26_INC) \
117 && ("$(KBUILD_TARGET)" != "darwin" || "$(VBOX_DEF_MACOSX_VERSION_MIN)" <= "10.6")
118#
119# Python 2.6 version
120#
121DLLS += VBoxPython2_6
122VBoxPython2_6_EXTENDS = VBoxPythonBase
123VBoxPython2_6_EXTENDS_BY = appending
124VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,)
125VBoxPython2_6_INCS = $(VBOX_PYTHON26_INC)
126VBoxPython2_6_LIBS = $(VBOX_PYTHON26_LIB)
127endif
128
129if defined(VBOX_PYTHON27_INC) && "$(KBUILD_TARGET)" != "darwin"
130#
131# Python 2.7 version
132#
133DLLS += VBoxPython2_7
134VBoxPython2_7_EXTENDS = VBoxPythonBase
135VBoxPython2_7_EXTENDS_BY = appending
136VBoxPython2_7_INCS = $(VBOX_PYTHON27_INC)
137VBoxPython2_7_LIBS = $(VBOX_PYTHON27_LIB)
138endif
139
140if defined(VBOX_PYTHON28_INC) && "$(KBUILD_TARGET)" != "darwin"
141#
142# Python 2.8 version
143#
144DLLS += VBoxPython2_8
145VBoxPython2_8_EXTENDS = VBoxPythonBase
146VBoxPython2_8_EXTENDS_BY = appending
147VBoxPython2_8_INCS = $(VBOX_PYTHON28_INC)
148VBoxPython2_8_LIBS = $(VBOX_PYTHON28_LIB)
149endif
150
151if defined(VBOX_PYTHONDEF_INC) && "$(KBUILD_TARGET)" != "darwin"
152#
153# Python without versioning
154#
155DLLS += VBoxPython
156VBoxPython_EXTENDS = VBoxPythonBase
157VBoxPython_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS))
158VBoxPython_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHONDEF_INC)
159if "$(KBUILD_TARGET)" == "linux"
160 VBoxPython_LIBS = $(VBoxPythonBase_LIBS)
161else
162 VBoxPython_LIBS = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB)
163endif
164endif
165
166endif # VBOX_ONLY_SDK
167
168#
169# Install the python modules.
170#
171INSTALLS += VBoxPython-inst-py-xpcom
172VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
173VBoxPython-inst-py-xpcom_SOURCES = \
174 vboxxpcom.py \
175 components.py \
176 file.py \
177 __init__.py \
178 nsError.py \
179 primitives.py \
180 xpcom_consts.py \
181 xpt.py \
182 client/__init__.py=>client/__init__.py \
183 server/__init__.py=>server/__init__.py \
184 server/enumerator.py=>server/enumerator.py \
185 server/factory.py=>server/factory.py \
186 server/loader.py=>server/loader.py \
187 server/module.py=>server/module.py \
188 server/policy.py=>server/policy.py
189
190
191include $(KBUILD_PATH)/subfooter.kmk
192
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