VirtualBox

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

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

xpidl,java/Makefile.kmk: Hacked the java mode of xpidl into producing output equivalent to that of genjifaces. There are some minor diffs still and the output spec needs fixing (file -> directory), the .java output compiles but has not been tested. xpidl is able to generate the enum constants used in VirtualBox, genjifaces isn't.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
Line 
1# $Id: Makefile.kmk 29118 2010-05-06 03:05:29Z 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_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
76 $(PATH_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) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" != "darwin.amd64"
104#
105# Python 2.5 version
106#
107DLLS += VBoxPython2_5
108VBoxPython2_5_EXTENDS = VBoxPythonBase
109VBoxPython2_5_EXTENDS_BY = appending
110VBoxPython2_5_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX105,)
111VBoxPython2_5_INCS = $(VBOX_PYTHON25_INC)
112VBoxPython2_5_LIBS = $(VBOX_PYTHON25_LIB)
113endif
114
115if defined(VBOX_PYTHON26_INC)
116#
117# Python 2.6 version
118#
119DLLS += VBoxPython2_6
120VBoxPython2_6_EXTENDS = VBoxPythonBase
121VBoxPython2_6_EXTENDS_BY = appending
122VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,)
123VBoxPython2_6_INCS = $(VBOX_PYTHON26_INC)
124VBoxPython2_6_LIBS = $(VBOX_PYTHON26_LIB)
125endif
126
127if defined(VBOX_PYTHON27_INC) && "$(KBUILD_TARGET)" != "darwin"
128#
129# Python 2.7 version
130#
131DLLS += VBoxPython2_7
132VBoxPython2_7_EXTENDS = VBoxPythonBase
133VBoxPython2_7_EXTENDS_BY = appending
134VBoxPython2_7_INCS = $(VBOX_PYTHON27_INC)
135VBoxPython2_7_LIBS = $(VBOX_PYTHON27_LIB)
136endif
137
138if defined(VBOX_PYTHON28_INC) && "$(KBUILD_TARGET)" != "darwin"
139#
140# Python 2.8 version
141#
142DLLS += VBoxPython2_8
143VBoxPython2_8_EXTENDS = VBoxPythonBase
144VBoxPython2_8_EXTENDS_BY = appending
145VBoxPython2_8_INCS = $(VBOX_PYTHON28_INC)
146VBoxPython2_8_LIBS = $(VBOX_PYTHON28_LIB)
147endif
148
149if defined(VBOX_PYTHONDEF_INC) && "$(KBUILD_TARGET)" != "darwin"
150#
151# Python without versioning
152#
153DLLS += VBoxPython
154VBoxPython_EXTENDS = VBoxPythonBase
155VBoxPython_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS))
156VBoxPython_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHONDEF_INC)
157if "$(KBUILD_TARGET)" == "linux"
158 VBoxPython_LIBS = $(VBoxPythonBase_LIBS)
159else
160 VBoxPython_LIBS = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB)
161endif
162endif
163
164endif # VBOX_ONLY_SDK
165
166#
167# Install the python modules.
168#
169INSTALLS += VBoxPython-inst-py-xpcom
170VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/
171VBoxPython-inst-py-xpcom_SOURCES = \
172 vboxxpcom.py \
173 components.py \
174 file.py \
175 __init__.py \
176 nsError.py \
177 primitives.py \
178 xpcom_consts.py \
179 xpt.py \
180 client/__init__.py=>client/__init__.py \
181 server/__init__.py=>server/__init__.py \
182 server/enumerator.py=>server/enumerator.py \
183 server/factory.py=>server/factory.py \
184 server/loader.py=>server/loader.py \
185 server/module.py=>server/module.py \
186 server/policy.py=>server/policy.py
187
188
189include $(KBUILD_PATH)/subfooter.kmk
190
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