VirtualBox

Changeset 960 in vbox


Ignore:
Timestamp:
Feb 17, 2007 9:12:10 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18727
Message:

Darwin hacking.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r957 r960  
    4949# Install paths.
    5050PATH_INS            := $(PATH_OUT)
    51 PATH_BIN             = $(PATH_INS)/bin
    52 PATH_DLL             = $(PATH_INS)/bin
    53 PATH_SYS             = $(PATH_INS)/bin
    54 PATH_LIB             = $(PATH_INS)/lib
    55 PATH_DOC             = $(PATH_INS)/doc
    56 INST_TESTCASE        = bin/testcase/
    57 INST_ADDITIONS       = bin/additions/
    58 INST_ADDITIONS_LIB   = lib/additions/
    59 INST_SDK             = bin/sdk
    60 INST_SDK_SAMPLES     = $(INST_SDK)/samples
     51ifeq ($(BUILD_TARGET),darwin)
     52 INST_DIST            = dist/
     53 INST_SDK             = $(INST_DIST)sdk/
     54 INST_SDK_SAMPLES     = $(INST_SDK)samples
     55
     56 # the bundles
     57 INST_VIRTUALBOX      = $(INST_DIST)VirtualBox.app/
     58 INST_VBOXDRV         = $(INST_DIST)VBoxDrv.kext/
     59 INST_VBOXTAP         = $(INST_DIST)VBoxTAP.kext/
     60 INST_VBOXUSB         = $(INST_DIST)VBoxUSB.kext/
     61
     62 # put everything in the VirtualBox app bundle.
     63 INST_BIN             = $(INST_VIRTUALBOX)Contents/MacOS/
     64 INST_DLL             = $(INST_BIN)
     65 INST_SYS             = $(INST_BIN)
     66 INST_TESTCASE        = $(INST_BIN)testcase/
     67 INST_ADDITIONS       = $(INST_BIN)MacOS/additions/
     68
     69 # other paths
     70 INST_LIB             = lib/
     71 INST_ADDITIONS_LIB   = $(PATH_LIB)/additions/
     72
     73else
     74
     75 INST_BIN             = bin/
     76 INST_DIST            = $(INST_BIN)
     77 INST_DLL             = $(INST_BIN)
     78 INST_SDK             = $(INST_BIN)sdk/
     79 INST_SDK_SAMPLES     = $(INST_SDK)samples
     80 INST_DLL             = $(INST_BIN)
     81 INST_SYS             = $(INST_BIN)
     82 INST_TESTCASE        = $(INST_BIN)testcase/
     83 INST_ADDITIONS       = $(INST_BIN)additions/
     84
     85 INST_LIB             = lib/
     86 INST_ADDITIONS_LIB   = $(INST_LIB)additions/
     87endif
     88
     89PATH_BIN              = $(patsubst %/,%,$(PATH_INS)/$(INST_BIN))
     90PATH_DLL              = $(patsubst %/,%,$(PATH_INS)/$(INST_DLL))
     91PATH_SYS              = $(patsubst %/,%,$(PATH_INS)/$(INST_SYS))
     92PATH_LIB              = $(patsubst %/,%,$(PATH_INS)/$(INST_LIB))
     93PATH_DOC              = $(PATH_OUT)/doc
     94VBOX_PATH_SDK         = $(patsubst %/,%,$(PATH_INS)/$(INST_SDK))
     95
     96
    6197
    6298# Delete targets on failure.
     
    602638 LIB_VMM         = $(PATH_BIN)/VBoxVMM.dylib
    603639 LIB_VMMGC       = $(PATH_BIN)/VMMGC.gc
    604  LIB_REM         = $(PATH_BIN)/VBoxREMImp.dylib
     640 LIB_REM         = $(PATH_LIB)/VBoxREMImp.dylib
    605641endif
    606642ifeq ($(BUILD_TARGET),l4)
     
    701737 VBOX_WITH_XPCOM      = 1
    702738 VBOX_XPIDL          ?= $(PATH_OBJ)/src/libs/xpcom18a4/xpidl/xpidl$(HOSTSUFF_EXE)
    703  VBOX_PATH_XPCOM_IDL ?= $(PATH_BIN)/sdk/idl
     739 VBOX_PATH_XPCOM_IDL ?= $(VBOX_PATH_SDK)/idl
    704740 VBOX_XPCOM_INCS     ?= \
    705         $(PATH_BIN)/sdk/include \
    706         $(PATH_BIN)/sdk/include/xpcom \
    707         $(PATH_BIN)/sdk/include/xpcom/nsprpub \
    708         $(PATH_BIN)/sdk/include/xpcom/string \
    709         $(PATH_BIN)/sdk/include/xpcom/xpcom \
    710         $(PATH_BIN)/sdk/include/xpcom/ipcd
     741        $(VBOX_PATH_SDK)/include \
     742        $(VBOX_PATH_SDK)/include/xpcom \
     743        $(VBOX_PATH_SDK)/include/xpcom/nsprpub \
     744        $(VBOX_PATH_SDK)/include/xpcom/string \
     745        $(VBOX_PATH_SDK)/include/xpcom/xpcom \
     746        $(VBOX_PATH_SDK)/include/xpcom/ipcd
    711747 # libIDL-config (for xpcom18a4)
    712748 ifeq ($(origin VBOX_LIBIDL_CONFIG),undefined)
     
    15231559TEMPLATE_VBOXMAINCLIENT_EXTENDS     = VBOXMAINEXE
    15241560TEMPLATE_VBOXMAINCLIENT_INCS        = $(TEMPLATE_VBOXMAINEXE_INCS) \
    1525         $(PATH_BIN)/sdk/include
     1561        $(VBOX_PATH_SDK)/include
    15261562ifdef VBOX_WITH_XPCOM
    15271563TEMPLATE_VBOXMAINCLIENT_INCS       += \
     
    15641600TEMPLATE_VBOXQTGUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS)
    15651601TEMPLATE_VBOXQTGUIEXE_INCS = \
    1566         $(PATH_BIN)/sdk/include \
     1602        $(VBOX_PATH_SDK)/include \
    15671603        $(VBOX_PATH_QT)/include
    15681604
     
    17851821TEMPLATE_VBOXW32GUESTR3_CFLAGS.kprofile     = $(TEMPLATE_VBOXW32GUESTR3_CXXFLAGS.kprofile)
    17861822TEMPLATE_VBOXW32GUESTR3_INCS                = \
    1787         $(PATH_BIN)/sdk/include
     1823        $(VBOX_PATH_SDK)/include
    17881824TEMPLATE_VBOXW32GUESTR3_LDFLAGS             = \
    17891825        /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LARGEADDRESSAWARE \
  • trunk/Makefile

    r957 r960  
    3535INSTALLS = bin
    3636
    37 bin_INST = bin/
     37bin_INST = $(INST_BIN)
    3838
    3939# The SDL DLLs
  • trunk/src/VBox/Devices/Makefile

    r923 r960  
    9595VBoxDD_LIBS.os2         = \
    9696        $(PATH_BIN)/VBoxDD2.dll
     97VBoxDD_LDFLAGS.darwin   = -install_name @executable_path/VBoxDD.dylib
    9798VBoxDD_LDFLAGS.linux    = -Wl,--no-undefined
    9899VBoxDD_LDFLAGS.l4       = -Wl,--no-undefined
     
    117118        $(LIB_VMM) \
    118119        $(LIB_RUNTIME)
    119 VBoxDD2_LDFLAGS.linux   = -Wl,--no-undefined
    120120ifeq ($(BUILD_TARGET),l4)
    121121VBoxDD2_LIBS           += \
     
    123123endif
    124124VBoxDD2_LIBS.darwin    += $(LIB_REM)
     125VBoxDD2_LDFLAGS.darwin  = -install_name @executable_path/VBoxDD2.dylib
     126VBoxDD2_LDFLAGS.linux   = -Wl,--no-undefined
    125127VBoxDD2_LDFLAGS.l4      = -Wl,--no-undefined
    126128
  • trunk/src/VBox/Devices/Storage/testcase/Makefile

    r729 r960  
    2929TEMPLATE        = VBOXR3EXE
    3030ifeq ($(filter-out win,$(BUILD_TARGET)),)
    31 LIBS            = $(PATH_LIB)/VBoxDD.lib
     31 LIBS           = $(PATH_LIB)/VBoxDD.lib
    3232else
    33 LIBS            = $(PATH_BIN)/VBoxDD$(VBOX_SUFF_DLL)
     33 LIBS           = \
     34        $(PATH_BIN)/VBoxDD$(VBOX_SUFF_DLL) \
     35        $(PATH_BIN)/VBoxDD2$(VBOX_SUFF_DLL) \
     36        $(LIB_VMM) \
     37        $(LIB_REM)
    3438endif
    3539LIBS           += $(LIB_RUNTIME)
  • trunk/src/VBox/Frontends/VBoxManage/Makefile

    r609 r960  
    4444        $(PATH_BIN)/VBoxDD$(VBOX_SUFF_DLL) \
    4545        $(PATH_BIN)/VBoxXML$(VBOX_SUFF_DLL) \
     46        $(LIB_VMM) \
    4647        $(LIB_REM)
    4748
  • trunk/src/VBox/Frontends/VirtualBox/src/main.cpp

    r382 r960  
    106106}
    107107
     108#ifdef __DARWIN__
     109#include <iprt/path.h>
     110#include <iprt/process.h>
     111#include <iprt/env.h>
     112
     113/**
     114 * App bundle tweaks.
     115 */
     116static void DarwinInit (void)
     117{
     118    static struct
     119    {
     120        char var[sizeof ("VBOX_XPCOM_HOME=") - 1];
     121        char path[RTPATH_MAX];
     122    } s;
     123
     124    strcpy (s.var, "VBOX_XPCOM_HOME=");
     125    int rc = RTPathProgram (&s.path[0], sizeof (s.path));
     126    if (RT_FAILURE (rc))
     127    {
     128        RTPrintf ("RTPathProgram failed!\n");
     129        exit (1);
     130    }
     131
     132    if (!RTEnvGet ("VBOX_XPCOM_HOME"))
     133        RTEnvPut (s.var);
     134}
     135#endif
     136
    108137int main( int argc, char ** argv )
    109138{
     
    122151    sigaction (SIGBUS, &sa, NULL);
    123152    sigaction (SIGUSR1, &sa, NULL);
     153#endif
     154
     155#ifdef __DARWIN__
     156    DarwinInit();
    124157#endif
    125158
  • trunk/src/VBox/HostDrivers/Support/Makefile

    r667 r960  
    184184VBoxDrv_LIBS          = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
    185185VBoxDrv_LDFLAGS       = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
    186 VBoxDrv_INST          = bin/VBoxDrv.kext/Contents/MacOS/
     186VBoxDrv_INST          = $(INST_VBOXDRV)Contents/MacOS/
    187187VBoxDrv_SOURCES       = \
    188188        $(VBOX_PATH_SUPPORT)/SUPDRVShared.c \
     
    190190
    191191INSTALLS += VBoxDrv.kext
    192 VBoxDrv.kext_INST     = bin/VBoxDrv.kext/Contents/
     192VBoxDrv.kext_INST     = $(INST_VBOXDRV)Contents/
    193193VBoxDrv.kext_SOURCES  = \
    194194        $(PATH_TARGET)/Info.plist
     
    204204
    205205INSTALLS += Scripts
    206 Scripts_INST     = bin/
     206Scripts_INST     = $(INST_DIST)
    207207Scripts_SOURCES  = \
    208208        $(VBOX_PATH_SUPPORT)/darwin/load.sh
  • trunk/src/VBox/Main/Makefile

    r923 r960  
    4646ifeq ($(BUILD_TARGET),win)
    4747 OTHERS          = $(PATH_BIN)/comregister.cmd
    48  IDLFILE         = $(PATH_BIN)/sdk/idl/VirtualBox.idl
     48 IDLFILE         = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
    4949 OTHER_CLEAN     = \
    5050        $(PATH_BIN)/comregister.cmd \
    51         $(PATH_BIN)/sdk/include/VirtualBox.h \
     51        $(VBOX_PATH_SDK)/include/VirtualBox.h \
    5252        $(IDLFILE) \
    53         $(PATH_BIN)/sdk/lib/VirtualBox.tlb \
    54         $(PATH_BIN)/sdk/lib/VirtualBox_i.c \
     53        $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
     54        $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
    5555        $(PATH_VBoxCOM)/VirtualBox.h \
    5656        $(PATH_VBoxCOM)/VirtualBox_i.c \
     
    5858else
    5959 INSTALLS        = xpcom-components
    60  IDLFILE         = $(PATH_BIN)/sdk/idl/VirtualBox_XPCOM.idl
     60 IDLFILE         = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
    6161 IDLTYPELIB      = $(PATH_BIN)/VirtualBox_XPCOM.xpt
    62  IDLHEADER       = $(PATH_BIN)/sdk/include/VirtualBox_XPCOM.h
     62 IDLHEADER       = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
    6363 OTHERS          = $(IDLTYPELIB)
    6464 OTHER_CLEAN     = \
     
    122122        $(PATH_VBoxSVC) \
    123123        $(PATH_VBoxCOM) \
    124         $(PATH_BIN)/sdk/include
     124        $(VBOX_PATH_SDK)/include
    125125ifneq ($(BUILD_TARGET),win)
    126126VBoxSVC_INCS += \
     
    136136        $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
    137137VBoxSVC_LIBS.darwin = \
     138        $(LIB_VMM) \
    138139        $(LIB_REM)
    139140else
     
    224225        $(PATH_VBoxC) \
    225226        $(PATH_VBoxCOM) \
    226         $(PATH_BIN)/sdk/include
     227        $(VBOX_PATH_SDK)/include
    227228ifneq ($(BUILD_TARGET),win)
    228229VBoxC_INCS          += \
    229230        $(VBOX_XPCOM_INCS)
    230231endif
     232VBoxC_LDFLAGS.darwin = -install_name @executable_path/VBoxC.dylib
    231233ifdef VBOX_USE_VCC80
    232234VBoxC_LDFLAGS.win = /MANIFEST
     
    307309        $(PATH_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
    308310endif
     311VBoxXML_LDFLAGS.darwin = -install_name @executable_path/VBoxXML.dylib -Wl,-x # no debug info please.
    309312
    310313## @todo (dmik): temporarily embed SettingsConverter.xsl into VBoxXML,
     
    355358        $(PATH_VBoxCOM)/VirtualBox_i.c
    356359VBoxCOM_INCS = \
    357         $(PATH_BIN)/sdk/include
     360        $(VBOX_PATH_SDK)/include
    358361
    359362
     
    366369        linux/helpers.cpp
    367370VBoxXPCOM_INCS = \
    368         $(PATH_BIN)/sdk/include \
     371        $(VBOX_PATH_SDK)/include \
    369372        include \
    370373        $(VBOX_XPCOM_INCS)
     
    438441# Creates the symlinks necessary for making XPCOM work.
    439442#
    440 xpcom-components_INST = bin/components/
     443xpcom-components_INST = $(INST_BIN)components/
    441444xpcom-components_SYMLINKS = \
    442445        VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
     
    491494$(IDLFILE): idl/midl.xsl $(XIDLFILE)
    492495        $(call MSG_L1,xsltproc $<,=> $@)
    493         $(QUIET)$(MKDIR) -p $(PATH_BIN)/sdk/idl
     496        $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
    494497        $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
    495498
     
    506509                /I idl \
    507510                $(subst /,\\,$<)
    508         $(MKDIR) -p $(PATH_BIN)/sdk/include
    509         $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(PATH_BIN)/sdk/include
    510         $(MKDIR) -p $(PATH_BIN)/sdk/lib
    511         $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(PATH_BIN)/sdk/lib
    512         $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(PATH_BIN)/sdk/lib
     511        $(MKDIR) -p $(VBOX_PATH_SDK)/include
     512        $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
     513        $(MKDIR) -p $(VBOX_PATH_SDK)/lib
     514        $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
     515        $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
    513516
    514517endif
  • trunk/src/VBox/Runtime/Makefile

    r939 r960  
    445445VBoxRT_TEMPLATE                = VBOXR3
    446446VBoxRT_SDKS.win                = WINPSDK W2K3DDK VBOX_NTDLL
     447ifeq ($(BUILD_TARGET),darwin)
     448VBoxRT_INST                    = $(INST_DLL) $(INST_TESTCASE)
     449endif
    447450VBoxRT_DEFS                    = $(RuntimeR3_DEFS) IN_SUP_R3 IN_SUP_R3
    448451VBoxRT_DEFS.$(BUILD_TYPE)      = $(RuntimeR3_DEFS.$(BUILD_TYPE))
     
    466469VBoxRT_LIBPATH.freebsd         = \
    467470        /usr/local/lib
    468 VBoxRT_LDFLAGS.darwin          = -framework IOKit
     471VBoxRT_LDFLAGS.darwin          = -framework IOKit -install_name @executable_path/VBoxRT.dylib
    469472ifdef VBOX_USE_VCC80
    470473VBoxRT_LDFLAGS.win             = /MANIFEST
     
    482485        $(PATH_LIB)/VBox-uuid$(VBOX_SUFF_LIB) \
    483486        $(PATH_LIB)/RuntimeR3L4$(VBOX_SUFF_LIB)
     487
    484488
    485489#
  • trunk/src/VBox/VMM/Makefile

    r1 r960  
    191191VMMGC_LIBS     += \
    192192        $(PATH_LIB)/VMMGCBuiltin$(VBOX_SUFF_LIB)
    193 endif   
     193endif
    194194ifeq ($(VBOX_LDR_FMT32),pe)
    195195VMMGC_LDFLAGS   = -Entry:VMMGCEntry
     
    347347VBoxVMM_LDFLAGS.win = /DELAYLOAD:dbghelp.dll
    348348VBoxVMM_LDFLAGS.linux = -Wl,--no-undefined
     349VBoxVMM_LDFLAGS.darwin = -install_name @executable_path/VBoxVMM.dylib
    349350
    350351include $(PATH_KBUILD)/footer.kmk
  • trunk/src/libs/xpcom18a4/Makefile.kmk

    r897 r960  
    7777                                     ipc/ipcd/extensions/dconnect/src \
    7878                                     ipc/ipcd/extensions/transmngr/common \
    79                                      $(PATH_BIN)/sdk/include \
    80                                      $(PATH_BIN)/sdk/include/xpcom \
    81                                      $(PATH_BIN)/sdk/include/xpcom/nsprpub \
    82                                      $(PATH_BIN)/sdk/include/xpcom/string \
    83                                      $(PATH_BIN)/sdk/include/xpcom/xpcom \
    84                                      $(PATH_BIN)/sdk/include/xpcom/ipcd
     79                                     $(VBOX_PATH_SDK)/include \
     80                                     $(VBOX_PATH_SDK)/include/xpcom \
     81                                     $(VBOX_PATH_SDK)/include/xpcom/nsprpub \
     82                                     $(VBOX_PATH_SDK)/include/xpcom/string \
     83                                     $(VBOX_PATH_SDK)/include/xpcom/xpcom \
     84                                     $(VBOX_PATH_SDK)/include/xpcom/ipcd
    8585TEMPLATE_XPCOM_INCS.darwin         = /Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon
    8686TEMPLATE_XPCOM_INCS.l4             = $(L4_INCDIR) $(VBOX_L4_GCC3_INCS)
     
    9999TEMPLATE_XPCOMEXE_EXTENDS          = XPCOM
    100100## @todo undo -fPIC.
    101 TEMPLATE_XPCOMEXE_INCS             = $(PATH_TARGET) ipc/ipcd/shared/src \
    102                                      $(PATH_BIN)/sdk/include \
    103                                      $(PATH_BIN)/sdk/include/xpcom \
    104                                      $(PATH_BIN)/sdk/include/xpcom/nsprpub \
    105                                      $(PATH_BIN)/sdk/include/xpcom/string \
    106                                      $(PATH_BIN)/sdk/include/xpcom/xpcom \
    107                                      $(PATH_BIN)/sdk/include/xpcom/ipcd
     101TEMPLATE_XPCOMEXE_INCS             = $(PATH_TARGET) \
     102                                     ipc/ipcd/shared/src \
     103                                     $(VBOX_PATH_SDK)/include \
     104                                     $(VBOX_PATH_SDK)/include/xpcom \
     105                                     $(VBOX_PATH_SDK)/include/xpcom/nsprpub \
     106                                     $(VBOX_PATH_SDK)/include/xpcom/string \
     107                                     $(VBOX_PATH_SDK)/include/xpcom/xpcom \
     108                                     $(VBOX_PATH_SDK)/include/xpcom/ipcd
    108109TEMPLATE_XPCOMEXE_LIBS             = \
    109110        $(TARGET_VBox-xpcom-ipcshared) \
     
    138139TEMPLATE_XPCOMBLDPROG_CFLAGS.release    = -O
    139140TEMPLATE_XPCOMBLDPROG_CFLAGS.profile    = -O
    140 TEMPLATE_XPCOMBLDPROG_INCS              = $(PATH_BIN)/sdk/include \
    141                                           $(PATH_BIN)/sdk/include/xpcom \
    142                                           $(PATH_BIN)/sdk/include/xpcom/nsprpub \
    143                                           $(PATH_BIN)/sdk/include/xpcom/string \
    144                                           $(PATH_BIN)/sdk/include/xpcom/xpcom \
    145                                           $(PATH_BIN)/sdk/include/xpcom/ipcd
     141TEMPLATE_XPCOMBLDPROG_INCS              = $(VBOX_PATH_SDK)/include \
     142                                          $(VBOX_PATH_SDK)/include/xpcom \
     143                                          $(VBOX_PATH_SDK)/include/xpcom/nsprpub \
     144                                          $(VBOX_PATH_SDK)/include/xpcom/string \
     145                                          $(VBOX_PATH_SDK)/include/xpcom/xpcom \
     146                                          $(VBOX_PATH_SDK)/include/xpcom/ipcd
    146147TEMPLATE_XPCOMBLDPROG_ORDERDEPS         = $(foreach hdrinst, $(filter %-HEADERS, $(INSTALLS)), $(TARGET_$(hdrinst)))
    147148
     
    507508xpidl_DEFS = EXPORT_XPT_API
    508509## @todo This assumes HOST == TARGET.
    509 xpidl_INST = bin/ $(INST_SDK)/bin/
     510xpidl_INST = $(INST_SDK)/bin/
    510511xpidl_SOURCES = \
    511512        xpcom/typelib/xpidl/xpidl.c \
     
    953954#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
    954955#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
     956VBoxXPCOM_LDFLAGS.darwin = -install_name @executable_path/VBoxXPCOM.dylib
    955957
    956958ifdef VBOX_IPC_RELEASE_LOG
     
    10211023        ipc/ipcd/client/src/ipcConnectionUnix.cpp \
    10221024        ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
     1025VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name @executable_path/VBoxXPCOMIPCC.dylib
    10231026VBoxXPCOMIPCC_LIBS = \
    10241027        $(TARGET_VBox-xpcom-ipcutils) \
     
    11951198OTHER_CLEAN += \
    11961199        $(PATH_VBox-xpcom-string)/idl_ts \
    1197         $(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.h,$(IDLFILES)))) \
    1198         $(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.xpt,$(IDLFILES)))) \
    1199         $(addprefix $(PATH_BIN)/sdk/idl/,$(notdir $(IDLFILES)))
     1200        $(addprefix $(VBOX_PATH_SDK)/include/,$(notdir $(subst .idl,.h,$(IDLFILES)))) \
     1201        $(addprefix $(VBOX_PATH_SDK)/include/,$(notdir $(subst .idl,.xpt,$(IDLFILES)))) \
     1202        $(addprefix $(VBOX_PATH_SDK)/idl/,$(notdir $(IDLFILES)))
    12001203
    12011204
     
    13131316XPIDL_INCS = -I xpcom/base/ -I xpcom/ds/ -I xpcom/components/ -I xpcom/io/ -I xpcom/threads/ -I xpcom/reflect/xptinfo/public/
    13141317define def_IDL
    1315 $(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.h,$(idl)))) \
     1318$(addprefix $(VBOX_PATH_SDK)/include/,$(notdir $(subst .idl,.h,$(idl)))) \
    13161319            $(PATH_TARGET)/$(notdir $(subst .idl,.xpt,$(idl))): $(idl) | $(TARGET_xpidl)
    13171320        $$(call MSG_L1,xpidl $$<)
    1318         $$(QUIET)$(MKDIR) -p $(PATH_BIN)/sdk/include $(PATH_BIN)/sdk/idl
     1321        $$(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/include $(VBOX_PATH_SDK)/idl
    13191322        $$(QUIET)$$(TARGET_xpidl) -m header $(XPIDL_INCS) -e $$@ $$<
    13201323        $$(QUIET)$$(TARGET_xpidl) -m typelib $(XPIDL_INCS) -e $(addprefix $(PATH_TARGET)/,$(notdir $(subst .idl,.xpt,$(idl)))) $$<
    1321         $$(QUIET)$(CP) $$< $$(PATH_BIN)/sdk/idl
     1324        $$(QUIET)$(CP) $$< $$(VBOX_PATH_SDK)/idl
    13221325endef
    13231326
     
    13251328
    13261329# dummy target.
    1327 $(PATH_VBox-xpcom-string)/idl_ts: $(addprefix $(PATH_BIN)/sdk/include/,$(notdir $(subst .idl,.h,$(IDLFILES))))
     1330$(PATH_VBox-xpcom-string)/idl_ts: $(addprefix $(VBOX_PATH_SDK)/include/,$(notdir $(subst .idl,.h,$(IDLFILES))))
    13281331        $(call MSG_L1,IDL processing completed.)
    13291332        $(QUIET)$(MKDIR) -p $(dir $@)
  • trunk/src/libs/xpcom18a4/xpcom/glue/standalone/nsXPCOMGlue.cpp

    r1 r960  
    111111
    112112        xpcomLib = PR_LoadLibraryWithFlags(libSpec, PR_LD_LAZY|PR_LD_GLOBAL);
     113#ifdef __DARWIN__
     114        /* works around bundle problem. */
     115        if (!xpcomLib) {
     116            const char *home = PR_GetEnv("VBOX_XPCOM_HOME");
     117            if (home) {
     118                char path[PATH_MAX];
     119                snprintf(path, sizeof(path), "%s/%s", home, libSpec.value.pathname);
     120                libSpec.value.pathname = path;
     121                xpcomLib = PR_LoadLibraryWithFlags(libSpec, PR_LD_LAZY|PR_LD_GLOBAL);
     122            }
     123        }
     124#endif
    113125        if (!xpcomLib)
    114126            return NS_ERROR_FAILURE;
     
    162174        xpcomLib = nsnull;
    163175    }
    164    
     176
    165177    memset(&xpcomFunctions, 0, sizeof(xpcomFunctions));
    166178    return NS_OK;
     
    170182#ifndef XPCOM_GLUE_NO_DYNAMIC_LOADING
    171183extern "C" NS_COM nsresult
    172 NS_InitXPCOM2(nsIServiceManager* *result, 
     184NS_InitXPCOM2(nsIServiceManager* *result,
    173185              nsIFile* binDirectory,
    174186              nsIDirectoryServiceProvider* appFileLocationProvider)
     
    442454      }
    443455  }
    444                  
     456
    445457#if XP_WIN32
    446   // On windows, the current directory is searched before the 
    447   // PATH environment variable.  This is a very bad thing 
     458  // On windows, the current directory is searched before the
     459  // PATH environment variable.  This is a very bad thing
    448460  // since libraries in the cwd will be picked up before
    449461  // any that are in either the application or GRE directory.
     
    465477    // Startup the XPCOM Glue that links us up with XPCOM.
    466478    nsresult rv = XPCOMGlueStartup(xpcomLocation);
    467    
     479
    468480    if (NS_FAILED(rv)) {
    469481        NS_WARNING("gre: XPCOMGlueStartup failed");
  • trunk/src/recompiler/new/Makefile.kmk

    r663 r960  
    66#
    77#   * op.c doesn't compile work correctly with gcc 4. For this we've
    8 #     checked in op.S, which is the reason why we don't compile op.c 
     8#     checked in op.S, which is the reason why we don't compile op.c
    99#     directly but always compile via the assembly file.s
    1010#   * On 64-bit Windows we lack a compiler and have to resort to a
    1111#     linux cross compiler building an ELF relocatable module which
    1212#     we then load using a wrapper module. Thus the REM_MOD mess.
    13 #   * On platforms using the 64-bit GCC ABI, we're not allowed to 
     13#   * On platforms using the 64-bit GCC ABI, we're not allowed to
    1414#     generate non-PIC shared objects, and op.c requires the code
    1515#     to be non-PIC. We apply the same trick as we developed for
     
    6767# L4 must use the no-crt path because it's lacking math stuff it seems...
    6868# Darwin must use the non-crt path because it can't compile op.c nativly.
    69 # All the AMD64 target must use the no-crt path because ELF doesn't like op.c 
     69# All the AMD64 target must use the no-crt path because ELF doesn't like op.c
    7070# when stuffed into a shared library and windows doesn't have 64-bit gcc (yet).
    7171#
     
    9999        fpu
    100100dyngen_SOURCES        = dyngen.c
    101                                
     101
    102102
    103103#
     
    158158        $(LIB_RUNTIME)
    159159  $(REM_MOD)_LIBS.darwin    = \
    160         $(PATH_BIN)/VBoxREMImp.dylib
    161   $(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress
     160        $(TARGET_VBoxREMImp)
     161#       $(PATH_BIN)/VBoxREMImp.dylib
     162  $(REM_MOD)_LDFLAGS.darwin  = -read_only_relocs suppress -multiply_defined warning  #-install_name @executable_path/$(REM_MOD).dylib#
    162163 else
    163164  $(REM_MOD)_LIBS           = \
     
    182183  $(REM_MOD)_INCS          += $(VBOX_L4_GCC3_INCS) $(L4_INCDIR)
    183184 endif
    184  
     185
    185186 $(REM_MOD)_DEFS           += IN_RING3 LOG_USE_C99
    186187 #$(REM_MOD)_DEFS          += DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB  # Enables huge amounts of debug logging.
     
    189190
    190191 $(REM_MOD)_LDFLAGS.l4      = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined
     192 $(REM_MOD)_LDFLAGS.darwin  = -read_only_relocs suppress -install_name @executable_path/$(REM_MOD).dylib -multiple_defined warning
    191193 ifeq ($(BUILD_TARGET_ARCH),amd64)
    192194  $(REM_MOD)_LIBS           = $(FILE_TOOL_GCC3_LIBGCC)
     
    223225#
    224226# The math testcase as a standalone program for testing and debugging purposes.
    225 # 
     227#
    226228## @todo This is a bit messy because of MINGW32.
    227229#BLDPROGS += testmath
     
    259261        VBoxREMWrapper.cpp \
    260262        VBoxREMWrapperA.asm
     263VBoxREM_LDFLAGS.darwin = -install_name @executable_path/VBoxREM.dylib
    261264VBoxREM_LIBS           = \
    262265        $(LIB_VMM) \
     
    269272#
    270273VBoxREMImp_TEMPLATE         = VBOXR3
     274ifeq ($(BUILD_TARGET),darwin)
     275VBoxREMImp_INST             = $(INST_LIB)
     276endif
    271277VBoxREMImp_SOURCES.win      = VBoxREM.def
    272278VBoxREMImp_SOURCES.os2      = $(PATH_TARGET)/VBoxREMOS2.def
     
    277283VBoxREMImp_SONAME.linux     = VBoxREM.so
    278284VBoxREMImp_SONAME.l4        = VBoxREM.s.so
    279 VBoxREMImp_LDFLAGS.darwin   = -install_name VBoxREM.dylib
     285VBoxREMImp_LDFLAGS.darwin   = -install_name @executable_path/VBoxREM.dylib
     286#VBoxREMImp_LDFLAGS.darwin   = -install_name VBoxREM.dylib
    280287VBoxREMImp_LDFLAGS.l4       = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib
    281288
     
    301308# Generate the op.S file somehow...
    302309#
    303 # Gathering the flags, defines and include dirs for the command is a lot 
    304 # of work. Unfortunately, there is only a highly specialized kBuild function 
     310# Gathering the flags, defines and include dirs for the command is a lot
     311# of work. Unfortunately, there is only a highly specialized kBuild function
    305312# for doing this, so we're currently left to our own devices here.
    306313#
    307 # Add something like VBOX_RECOMPILER_OP_GCC = gcc-3.4.6 to LocalConfig.kmk 
    308 # to be 100% sure that you get a working op.S. My gcc 4.1.1 seems to work 
     314# Add something like VBOX_RECOMPILER_OP_GCC = gcc-3.4.6 to LocalConfig.kmk
     315# to be 100% sure that you get a working op.S. My gcc 4.1.1 seems to work
    309316# fine, so feel free to try VBOX_RECOMPILER_OP_GCC = gcc.
    310317#
     
    325332  VBOX_RECOMPILER_OP_GCC_OK := dunno
    326333 endif
    327 else 
     334else
    328335 # If set, assume it's an OK compiler.
    329336 VBOX_RECOMPILER_OP_GCC_OK := yes
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