VirtualBox

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

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

Python: Darwin multibin build

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1# $Id: Makefile.kmk 20971 2009-06-26 13:43:58Z 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)))
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
105VBoxPython25_LDFLAGS.darwin = -install_name /Users/vbox/nike/ws/out/darwin.x86/debug/dist/VirtualBox.app/Contents/MacOS/VBoxPython2_5.so
106#VBoxPython25_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxPython2_5.so
107
108VBoxPython25_DEFS = VBOX_PYXPCOM_VERSIONED
109VBoxPython25_INCS = $(VBOX_PYTHON25_INC)
110VBoxPython25_LIBS = $(VBOX_PYTHON25_LIB)
111
112ifdef VBOX_PYTHON25_INC
113 KNOWN_GLUE += VBoxPython25
114endif
115
116# Python 2.6 version
117VBoxPython26_EXTENDS = VBoxPythonBase
118VBoxPython26_EXTENDS_BY = appending
119VBoxPython26_NAME = VBoxPython2_6
120VBoxPython26_TEMPLATE = XPCOM
121
122VBoxPython26_DEFS = VBOX_PYXPCOM_VERSIONED
123VBoxPython26_INCS = $(VBOX_PYTHON26_INC)
124VBoxPython26_LIBS = $(VBOX_PYTHON26_LIB)
125
126ifdef VBOX_PYTHON26_INC
127 KNOWN_GLUE += VBoxPython26
128endif
129
130# Python 2.7 version
131VBoxPython27_EXTENDS = VBoxPythonBase
132VBoxPython27_EXTENDS_BY = appending
133VBoxPython27_NAME = VBoxPython2_7
134VBoxPython27_TEMPLATE = XPCOM
135
136VBoxPython27_DEFS = VBOX_PYXPCOM_VERSIONED
137VBoxPython27_INCS = $(VBOX_PYTHON27_INC)
138VBoxPython27_LIBS = $(VBOX_PYTHON27_LIB)
139
140ifdef VBOX_PYTHON27_INC
141 KNOWN_GLUE += VBoxPython27
142endif
143
144# Python 2.8 version
145VBoxPython28_EXTENDS = VBoxPythonBase
146VBoxPython28_EXTENDS_BY = appending
147VBoxPython28_NAME = VBoxPython2_8
148VBoxPython28_TEMPLATE = XPCOM
149
150VBoxPython28_DEFS = VBOX_PYXPCOM_VERSIONED
151VBoxPython28_INCS = $(VBOX_PYTHON28_INC)
152VBoxPython28_LIBS = $(VBOX_PYTHON28_LIB)
153
154ifdef VBOX_PYTHON28_INC
155 KNOWN_GLUE += VBoxPython28
156endif
157
158# Python without versioning
159VBoxPython_EXTENDS = VBoxPythonBase
160VBoxPython_EXTENDS_BY = appending
161VBoxPython_TEMPLATE = XPCOM
162
163VBoxPython_INCS = $(VBOX_PYTHONDEF_INC)
164if "$(KBUILD_TARGET)" == "linux"
165 VBoxPython_LIBS =
166else
167 VBoxPython_LIBS = $(VBOX_PYTHONDEF_LIB)
168endif
169
170ifdef VBOX_PYTHONDEF_INC
171 KNOWN_GLUE += VBoxPython
172endif
173
174VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
175VBoxPython-inst-py-xpcom_SOURCES = \
176 vboxxpcom.py \
177 components.py \
178 file.py \
179 __init__.py \
180 nsError.py \
181 primitives.py \
182 xpcom_consts.py \
183 xpt.py \
184 client/__init__.py=>client/__init__.py \
185 server/__init__.py=>server/__init__.py \
186 server/enumerator.py=>server/enumerator.py \
187 server/factory.py=>server/factory.py \
188 server/loader.py=>server/loader.py \
189 server/module.py=>server/module.py \
190 server/policy.py=>server/policy.py
191
192
193ifndef VBOX_ONLY_SDK
194 DLLS += $(KNOWN_GLUE)
195endif
196
197INSTALLS += VBoxPython-inst-py-xpcom
198
199include $(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