VirtualBox

Changeset 11587 in vbox for trunk/src/libs


Ignore:
Timestamp:
Aug 22, 2008 9:42:22 PM (16 years ago)
Author:
vboxsync
Message:

VBOX_WITH_PYTHON, makefile variable scoping, adjustments to the python include guessing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r11584 r11587  
    3737# should be a check whether VBoxXPCOM.so contains global C symbols (at least
    3838# where the whitelisting of symbols via the map file is not used).
    39 
    40 
    41 # Temporary disable everywhere, as there's no decent Python headers
    42 # installed on build servers
    43 #if1of ($(KBUILD_TARGET), linux)
    44 ifeq ($(VBOX_WITH_PYTHON),1)
    45 # Find most appropriate Python headers
    46 PYTHON_INCS=$(lastword $(sort $(wildcard /usr/include/python2.*/)))
    47 ifeq ($(wildcard $(PYTHON_INCS)/Python.h),)
    48 PYTHON_INCS=
    49 endif
    50 endif
    51 
    52 # build Python<->XPCOM bridge only if Python headers found
    53 ifneq ($(PYTHON_INCS),)
    54 # bridge for Python to invoke XPCOM
    55 XPCOM_PYMOD = VBox-xpcom-pymod
    56 endif
    5739
    5840#
     
    280262        VBox-xpcom-ipcdlock \
    281263        VBox-xpcom-ipctransmgr \
    282         VBox-xpcom-ipctmgrcom
    283 
    284 DLLS +=                         \
    285         VBoxXPCOM               \
    286         VBoxXPCOMIPCC           \
    287         $(XPCOM_PYMOD)         
    288 
    289 # we put it here, as template it uses depends on VBoxRT,
     264        VBox-xpcom-ipctmgrcom
     265
     266DLLS += \
     267        VBoxXPCOM \
     268        VBoxXPCOMIPCC
     269
     270# we put it here, as template it uses depends on VBoxRT,
    290271# which may not be built yet
    291 OTHERS +=                       \
     272OTHERS += \
    292273        $(TARGET_VBox-xpcom-helper)
    293274
     
    12601241
    12611242
     1243#
    12621244# DCONNECT client shared object
     1245#
    12631246VBoxXPCOMIPCC_TEMPLATE = XPCOMIPC
    12641247VBoxXPCOMIPCC_NAME.os2 = VBoxIPCC
     
    12901273
    12911274
     1275#
     1276# DCONNECT daemon executable
     1277#
     1278VBoxXPCOMIPCD_TEMPLATE = XPCOMIPCEXE
     1279VBoxXPCOMIPCD_SOURCES = \
     1280        ipc/ipcd/daemon/src/ipcd.cpp \
     1281        ipc/ipcd/daemon/src/ipcClient.cpp \
     1282        ipc/ipcd/daemon/src/ipcModuleReg.cpp \
     1283        ipc/ipcd/daemon/src/ipcCommandModule.cpp
     1284ifeq ($(KBUILD_TARGET),win)
     1285 VBoxXPCOMIPCD_SOURCES += \
     1286        ipc/ipcd/daemon/src/ipcdWin.cpp
     1287else
     1288 VBoxXPCOMIPCD_SOURCES += \
     1289        ipc/ipcd/daemon/src/ipcdUnix.cpp
     1290endif
     1291
     1292
     1293#
    12921294# Helper for initialization of XPCOM
     1295#
    12931296VBox-xpcom-helper_TEMPLATE = VBOXMAINCLIENTDLL
     1297## @todo why isn't this targetd called VBoxHlp and what is it good for anyway? it's not in any of the lists so it won't be processed or anything...
    12941298VBox-xpcom-helper_NAME = VBoxHlp
    12951299VBox-xpcom-helper_DEFS =
     
    12971301        xpcom/helper/helper.cpp
    12981302
    1299 # Python Client Module
     1303
     1304#
     1305# Python<->XPCOM bridge.
     1306#
     1307
     1308# Find the Python headers for the Python<->XPCOM bridge if enabled.
     1309ifdef VBOX_WITH_PYTHON
     1310  ifndef VBOX_PATH_PYTHON_INC
     1311   VBOX_PATH_PYTHON_INC := $(patsubst %/Python.h,%, $(lastword $(sort $(wildcard \
     1312        /usr/include/python2.*/Python.h \
     1313        /usr/local/include/python2.*/Python.h \
     1314        ))))
     1315   ifeq ($(VBOX_PATH_PYTHON_INC),)
     1316    $(warning Unable to determin the python include directory (VBOX_PATH_PYTHON_INC).)
     1317   endif
     1318 endif
     1319 DLLS +=VBox-xpcom-pymod
     1320endif
     1321
     1322# Python Client Module.
    13001323PY_PATH = sdk/bindings/com/python/xpcom
    13011324PY_DEST = $(PATH_BIN)/$(PY_PATH)
     
    13031326
    13041327VBox-xpcom-pymod_TEMPLATE = XPCOM
     1328## @todo why isn't this target called VBoxPython?
    13051329VBox-xpcom-pymod_NAME = VBoxPython
    13061330VBox-xpcom-pymod_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTI_API EXPORT_XPT_API VBOX_PYXPCOM
    1307 VBox-xpcom-pymod_INCS += $(PYTHON_INCS) python/src
     1331VBox-xpcom-pymod_INCS += $(VBOX_PATH_PYTHON_INC) python/src
    13081332VBox-xpcom-pymod_SOURCES = \
    13091333        python/src/module/_xpcom.cpp \
     
    13291353        python/src/TypeObject.cpp \
    13301354        python/src/VariantUtils.cpp
    1331 VBox-xpcom-pymod_LIBS = $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
     1355VBox-xpcom-pymod_LIBS = $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
     1356## @todo rewrite this to an INSTALLS target, it's just copying.
    13321357VBox-xpcom-pymod_DEPS = \
    13331358        $(PY_DEST)/components.py \
     
    13611386        $(QUIET)$(CP) -f -- $< $@
    13621387
    1363 
    1364 # DCONNECT daemon executable
    1365 VBoxXPCOMIPCD_TEMPLATE = XPCOMIPCEXE
    1366 VBoxXPCOMIPCD_SOURCES = \
    1367         ipc/ipcd/daemon/src/ipcd.cpp \
    1368         ipc/ipcd/daemon/src/ipcClient.cpp \
    1369         ipc/ipcd/daemon/src/ipcModuleReg.cpp \
    1370         ipc/ipcd/daemon/src/ipcCommandModule.cpp
    1371 ifeq ($(KBUILD_TARGET),win)
    1372  VBoxXPCOMIPCD_SOURCES += \
    1373         ipc/ipcd/daemon/src/ipcdWin.cpp
    1374 else
    1375  VBoxXPCOMIPCD_SOURCES += \
    1376         ipc/ipcd/daemon/src/ipcdUnix.cpp
    1377 endif
    13781388
    13791389#
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette