Changeset 28537 in vbox
- Timestamp:
- Apr 20, 2010 10:09:02 PM (15 years ago)
- Location:
- trunk/src/libs/xpcom18a4/python
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/Makefile.kmk
r28370 r28537 5 5 6 6 # 7 # Copyright (C) 2009 Sun Microsystems, Inc.7 # Copyright (C) 2009-2010 Sun Microsystems, Inc. 8 8 # 9 9 # This file is part of VirtualBox Open Source Edition (OSE), as … … 24 24 25 25 ifdef VBOX_WITH_MULTIVERSION_PYTHON 26 VBOX_MULTIPYTHON = 126 VBOX_MULTIPYTHON = 1 27 27 else 28 VBOX_MULTIPYTHON = 028 VBOX_MULTIPYTHON = 0 29 29 endif 30 30 31 # list of supported Python versions 32 $(eval $(patsubst %|,%$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON)))) 31 # 32 # List of supported Python versions, defining a number of 33 # VBOX_PYTHON[25|26|27|28|DEF]_[INC|LIB] variables which get picked up below. 34 # 35 #$(eval $(patsubst %|,%$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON)))) 36 $(eval $(subst |,$(NL),$(shell $(VBOX_BLD_PYTHON) $(PATH_SUB_CURRENT)/gen_python_deps.py $(KBUILD_TARGET) $(KBUILD_TARGET_ARCH) $(VBOX_MULTIPYTHON)))) 33 37 34 # Python Client Module - the C++/XPCOM bits. 38 ifndef VBOX_ONLY_SDK 39 40 # 41 # Base Python Client Module - the C++/XPCOM bits (not actually built). 42 # 35 43 VBoxPythonBase_TEMPLATE = XPCOM 44 VBoxPythonBase_CXXFLAGS = -Wno-write-strings 45 VBoxPythonBase_DLLSUFF.darwin = .so 36 46 VBoxPythonBase_DEFS = \ 37 47 _IMPL_NS_COM \ … … 40 50 EXPORT_XPT_API \ 41 51 VBOX_PYXPCOM \ 42 VBOX_WITH_XPCOM 52 VBOX_WITH_XPCOM \ 53 VBOX_PYXPCOM_VERSIONED 43 54 VBoxPythonBase_INCS = \ 44 55 src 45 VBoxPythonBase_CXXFLAGS = -Wno-write-strings46 47 56 VBoxPythonBase_SOURCES = \ 48 57 src/module/_xpcom.cpp \ … … 68 77 src/TypeObject.cpp \ 69 78 src/VariantUtils.cpp 70 71 VBoxPythonBase_LIBS = \ 79 VBoxPythonBase_LIBS = \ 72 80 $(PATH_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \ 73 81 $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL) 74 82 75 ifeq ($(KBUILD_TARGET),darwin) 76 ## @todo kBuild - this ain't working: VBoxPython_DLLSUFF.darwin = .so 77 VBoxPythonBase_DLLSUFF = .so 83 84 if defined(VBOX_PYTHON23_INC) \ 85 && ("$(KBUILD_TARGET)" != "darwin" || ("$(KBUILD_TARGET_ARCH)" == "x86" && defined(VBOX_WITH_MAC_OS_X_10_4_SUPPORT) )) 86 # 87 # Python 2.3 version 88 # 89 DLLS += VBoxPython2_3 90 VBoxPython2_3_EXTENDS = VBoxPythonBase 91 VBoxPython2_3_EXTENDS_BY = appending 92 VBoxPython2_3_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,) 93 VBoxPython2_3_INCS = $(VBOX_PYTHON23_INC) 94 VBoxPython2_3_LIBS = $(VBOX_PYTHON23_LIB) 78 95 endif 79 96 80 # Python 2.3 version 81 VBoxPython23_EXTENDS = VBoxPythonBase 82 VBoxPython23_EXTENDS_BY = appending 83 VBoxPython23_NAME = VBoxPython2_3 84 VBoxPython23_TEMPLATE = XPCOM 85 86 VBoxPython23_DEFS = VBOX_PYXPCOM_VERSIONED 87 VBoxPython23_INCS = $(VBOX_PYTHON23_INC) 88 VBoxPython23_LIBS = $(VBOX_PYTHON23_LIB) 89 90 ifdef VBOX_PYTHON23_INC 91 KNOWN_GLUE += VBoxPython23 97 if defined(VBOX_PYTHON24_INC) && "$(KBUILD_TARGET)" != "darwin" 98 # 99 # Python 2.4 version 100 # 101 DLLS += VBoxPython2_4 102 VBoxPython2_4_EXTENDS = VBoxPythonBase 103 VBoxPython2_4_EXTENDS_BY = appending 104 VBoxPython2_4_INCS = $(VBOX_PYTHON24_INC) 105 VBoxPython2_4_LIBS = $(VBOX_PYTHON24_LIB) 92 106 endif 93 107 94 # Python 2.4 version 95 VBoxPython24_EXTENDS = VBoxPythonBase 96 VBoxPython24_EXTENDS_BY = appending 97 VBoxPython24_NAME = VBoxPython2_4 98 VBoxPython24_TEMPLATE = XPCOM 99 100 VBoxPython24_DEFS = VBOX_PYXPCOM_VERSIONED 101 VBoxPython24_INCS = $(VBOX_PYTHON24_INC) 102 VBoxPython24_LIBS = $(VBOX_PYTHON24_LIB) 103 104 ifdef VBOX_PYTHON24_INC 105 KNOWN_GLUE += VBoxPython24 108 if defined(VBOX_PYTHON25_INC) && "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" != "darwin.amd64" 109 # 110 # Python 2.5 version 111 # 112 DLLS += VBoxPython2_5 113 VBoxPython2_5_EXTENDS = VBoxPythonBase 114 VBoxPython2_5_EXTENDS_BY = appending 115 VBoxPython2_5_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX105,) 116 VBoxPython2_5_INCS = $(VBOX_PYTHON25_INC) 117 VBoxPython2_5_LIBS = $(VBOX_PYTHON25_LIB) 106 118 endif 107 119 108 # Python 2.5 version 109 VBoxPython25_EXTENDS = VBoxPythonBase 110 VBoxPython25_EXTENDS_BY = appending 111 VBoxPython25_NAME = VBoxPython2_5 112 if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86" 113 VBoxPython25_TEMPLATE = XPCOMOSX105 114 else 115 VBoxPython25_TEMPLATE = XPCOM 120 if defined(VBOX_PYTHON26_INC) && "$(KBUILD_TARGET)" != "darwin" 121 # 122 # Python 2.6 version 123 # 124 DLLS += VBoxPython2_6 125 VBoxPython2_6_EXTENDS = VBoxPythonBase 126 VBoxPython2_6_EXTENDS_BY = appending 127 VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,) 128 VBoxPython2_6_INCS = $(VBOX_PYTHON26_INC) 129 VBoxPython2_6_LIBS = $(VBOX_PYTHON26_LIB) 116 130 endif 117 131 118 VBoxPython25_DEFS = VBOX_PYXPCOM_VERSIONED 119 VBoxPython25_INCS = $(VBOX_PYTHON25_INC) 120 VBoxPython25_LIBS = $(VBOX_PYTHON25_LIB) 121 122 ifdef VBOX_PYTHON25_INC 123 KNOWN_GLUE += VBoxPython25 132 if defined(VBOX_PYTHON27_INC) && "$(KBUILD_TARGET)" != "darwin" 133 # 134 # Python 2.7 version 135 # 136 DLLS += VBoxPython2_7 137 VBoxPython2_7_EXTENDS = VBoxPythonBase 138 VBoxPython2_7_EXTENDS_BY = appending 139 VBoxPython2_7_INCS = $(VBOX_PYTHON27_INC) 140 VBoxPython2_7_LIBS = $(VBOX_PYTHON27_LIB) 124 141 endif 125 142 126 # Python 2.6 version 127 VBoxPython26_EXTENDS = VBoxPythonBase 128 VBoxPython26_EXTENDS_BY = appending 129 VBoxPython26_NAME = VBoxPython2_6 130 if "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "darwin.x86" 131 VBoxPython26_TEMPLATE = XPCOMOSX105 132 else 133 VBoxPython26_TEMPLATE = XPCOM 143 if defined(VBOX_PYTHON28_INC) && "$(KBUILD_TARGET)" != "darwin" 144 # 145 # Python 2.8 version 146 # 147 DLLS += VBoxPython2_8 148 VBoxPython2_8_EXTENDS = VBoxPythonBase 149 VBoxPython2_8_EXTENDS_BY = appending 150 VBoxPython2_8_INCS = $(VBOX_PYTHON28_INC) 151 VBoxPython2_8_LIBS = $(VBOX_PYTHON28_LIB) 134 152 endif 135 153 136 VBoxPython26_DEFS = VBOX_PYXPCOM_VERSIONED 137 VBoxPython26_INCS = $(VBOX_PYTHON26_INC) 138 VBoxPython26_LIBS = $(VBOX_PYTHON26_LIB) 139 140 ifdef VBOX_PYTHON26_INC 141 KNOWN_GLUE += VBoxPython26 154 if defined(VBOX_PYTHONDEF_INC) && "$(KBUILD_TARGET)" != "darwin" 155 # 156 # Python without versioning 157 # 158 DLLS += VBoxPython 159 VBoxPython_EXTENDS = VBoxPythonBase 160 VBoxPython_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) 161 VBoxPython_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHONDEF_INC) 162 if "$(KBUILD_TARGET)" == "linux" 163 VBoxPython_LIBS = $(VBoxPythonBase_LIBS) 164 else 165 VBoxPython_LIBS = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB) 166 endif 142 167 endif 143 168 144 # Python 2.7 version 145 VBoxPython27_EXTENDS = VBoxPythonBase 146 VBoxPython27_EXTENDS_BY = appending 147 VBoxPython27_NAME = VBoxPython2_7 148 VBoxPython27_TEMPLATE = XPCOM 169 endif # VBOX_ONLY_SDK 149 170 150 VBoxPython27_DEFS = VBOX_PYXPCOM_VERSIONED 151 VBoxPython27_INCS = $(VBOX_PYTHON27_INC) 152 VBoxPython27_LIBS = $(VBOX_PYTHON27_LIB) 153 154 ifdef VBOX_PYTHON27_INC 155 KNOWN_GLUE += VBoxPython27 156 endif 157 158 # Python 2.8 version 159 VBoxPython28_EXTENDS = VBoxPythonBase 160 VBoxPython28_EXTENDS_BY = appending 161 VBoxPython28_NAME = VBoxPython2_8 162 VBoxPython28_TEMPLATE = XPCOM 163 164 VBoxPython28_DEFS = VBOX_PYXPCOM_VERSIONED 165 VBoxPython28_INCS = $(VBOX_PYTHON28_INC) 166 VBoxPython28_LIBS = $(VBOX_PYTHON28_LIB) 167 168 ifdef VBOX_PYTHON28_INC 169 KNOWN_GLUE += VBoxPython28 170 endif 171 172 # Python without versioning 173 VBoxPython_EXTENDS = VBoxPythonBase 174 VBoxPython_EXTENDS_BY = appending 175 VBoxPython_TEMPLATE = XPCOM 176 177 VBoxPython_INCS = $(VBOX_PYTHONDEF_INC) 178 if "$(KBUILD_TARGET)" == "linux" 179 VBoxPython_LIBS = 180 else 181 VBoxPython_LIBS = $(VBOX_PYTHONDEF_LIB) 182 endif 183 184 ifdef VBOX_PYTHONDEF_INC 185 KNOWN_GLUE += VBoxPython 186 endif 187 171 # 172 # Install the python modules. 173 # 174 INSTALLS += VBoxPython-inst-py-xpcom 188 175 VBoxPython-inst-py-xpcom_INST = $(INST_SDK)bindings/xpcom/python/xpcom/ 189 176 VBoxPython-inst-py-xpcom_SOURCES = \ … … 205 192 206 193 207 ifndef VBOX_ONLY_SDK 208 DLLS += $(KNOWN_GLUE) 209 endif 194 include $(KBUILD_PATH)/subfooter.kmk 210 195 211 INSTALLS += VBoxPython-inst-py-xpcom212 213 include $(KBUILD_PATH)/subfooter.kmk -
trunk/src/libs/xpcom18a4/python/gen_python_deps.py
r28512 r28537 78 78 79 79 if target == 'darwin': 80 ## @todo Pick up the locations from VBOX_PATH_MACOSX_SDK_10_*. 80 81 prefixes = ['/Developer/SDKs/MacOSX10.4u.sdk/usr', '/Developer/SDKs/MacOSX10.5.sdk/usr', '/Developer/SDKs/MacOSX10.6.sdk/usr'] 81 # Python 2.3 on Darwin buildbox is bad82 # /Developer/SDKs/MacOSX10.4u.sdk/usr/include/python2.3/pyport.h:554:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?).83 versions.remove("2.3")84 82 dllsuff = '.dylib' 85 83
Note:
See TracChangeset
for help on using the changeset viewer.