Makefile.kmk revision 3b638df297baae99b3f2cd54f5c41c393ce68d32
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# Makefile for the VBox Main module.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# Copyright (C) 2006-2007 innotek GmbH
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# available from http://www.virtualbox.org. This file is free software;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# you can redistribute it and/or modify it under the terms of the GNU
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# General Public License as published by the Free Software Foundation,
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# distribution. VirtualBox OSE is distributed in the hope that it will
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# be useful, but WITHOUT ANY WARRANTY of any kind.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncDEPTH = ../../..
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncinclude $(PATH_KBUILD)/header.kmk
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncSUBDIRS_AFTER = testcase
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncifndef VBOX_OSE
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncSUBDIRS_AFTER += webservice
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncLIBRARIES = VBoxCOM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncDLLS = VBoxXML VBoxC
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncPROGRAMS = VBoxSVC
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifneq ($(BUILD_TARGET),win)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync ifndef VBOX_WITH_XPCOM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(error "VBox: VBOX_WITH_XPCOM isn't defined")
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync DLLS += VBoxSVCM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync ifneq ($(BUILD_TARGET),os2)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync DEFS += VBOX_WITH_SYS_V_IPC_SESSION_WATCHER
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync DEFS += VBOX_WITH_UNIXY_TAP_NETWORKING
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync#PROGRAMS = tstCFGLdr
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TARGET),win)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync OTHERS = $(PATH_BIN)/comregister.cmd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync OTHER_CLEAN = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBOX_PATH_SDK)/include/VirtualBox.h \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(IDLFILE) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync $(PATH_VBoxCOM)/VirtualBox.h \
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync $(PATH_VBoxCOM)/VirtualBox_i.c \
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync $(PATH_VBoxCOM)/VirtualBox.tlb
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync INSTALLS = xpcom-components
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
acca7ab818eb8c2832aa27e27ce53133fba927dbvboxsync ifeq ($(BUILD_TARGET),linux)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync IDLTYPELIB = $(PATH_BIN)/VirtualBox_XPCOM.xpt
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync IDLTYPELIB = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync IDLHEADER = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync OTHERS = $(IDLTYPELIB)
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync OTHER_CLEAN = \
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync $(IDLFILE) \
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync $(IDLHEADER) \
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync $(IDLTYPELIB)
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync# The Main API documentation
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsyncdocs: $(PATH_TARGET)/docs.Main
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync$(PATH_TARGET)/docs.Main: \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync | $(call DIRDEP, $(PATH_TARGET)) \
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsync $(call DIRDEP, $(PATH_OUT)/docs/Main)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(RM) -f $(wildcard $(PATH_OUT)/docs/Main/html/*)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBOX_XSLTPROC) -o $(PATH_TARGET)/VirtualBox.idl idl/doxygen.xsl idl/VirtualBox.xidl
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync PATH_OUT="$(PATH_OUT)" PATH_TARGET="$(PATH_TARGET)" PATH_CHM="$(subst /,\\,$(PATH_BIN)/VirtualBoxAPI.chm)" doxygen Doxyfile.Main
5eb36887f6970e0033f63fa135f3bb8fbfd6059bvboxsync -$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(PATH_OUT)/docs/Main/html/index.hhp)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(APPEND) $(PATH_TARGET)/docs.Main
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(call DIRDEP, $(PATH_OUT)/docs/Main):
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(MKDIR) -p $@
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# VBoxSVC executable
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_TEMPLATE = VBOXMAINEXE
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS = CFGLDR_HAVE_COM IN_CFGLDR_R3
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_VRDP
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS += VBOX_VRDP IN_VRDP_R3
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_HGCM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS += VBOX_HGCM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_MAIN_RELEASE_LOG
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_USB
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsyncVBoxSVC_DEFS += VBOX_WITH_USB
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsyncifdef VBOX_WITH_EHCI
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsyncVBoxSVC_DEFS += VBOX_WITH_EHCI
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsyncifdef VBOX_WITH_PDMUSB
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsyncVBoxSVC_DEFS += VBOX_WITH_PDMUSB
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsyncifdef VBOX_WITH_ALSA
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS += VBOX_WITH_ALSA
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_WINMM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS += VBOX_WITH_WINMM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITHOUT_LINUX_COMPILER_H
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS += VBOX_WITHOUT_LINUX_COMPILER_H
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxSVC_DEFS.linux += VBOX_USE_LIBHAL
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxSVC_DEFS.solaris += VBOX_USE_LIBHAL
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_INCS = \
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync $(PATH_VBoxSVC) \
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync $(PATH_VBoxCOM) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_CURRENT)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TARGET),win)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxSVC_LIBS += \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_LIB)/VBoxDDU$(VBOX_SUFF_LIB) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_LIB)/VBoxXML$(VBOX_SUFF_LIB)
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync VBoxSVC_LIBS += \
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync $(PATH_BIN)/VBoxDDU$(VBOX_SUFF_DLL) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_BIN)/VBoxXML$(VBOX_SUFF_DLL)
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync $(LIB_VMM) \
25c15196ec95f6a53e802167c815286cecfeb278vboxsyncVBoxSVC_SOURCES = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_VRDP
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_SOURCES += VRDPServerImpl.cpp
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_XPCOM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_SOURCES += \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_USB
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_SOURCES.darwin += darwin/USBProxyServiceDarwin.cpp
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_SOURCES.linux += linux/USBProxyServiceLinux.cpp
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_SOURCES.win += win32/USBProxyServiceWin32.cpp
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_LDFLAGS.darwin = -framework IOKit
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TYPE),debug)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
a0a3a26a4065b9401681a8c99a11bd83e08f94ccvboxsync## Alternative USB filtering.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync#ifeq ($(filter-out darwin,$(BUILD_TARGET)),)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync#VBoxSVC_DEFS += VBOX_WITH_USBFILTER
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync#VBoxSVC_LIBS += $(PATH_LIB)/USBLib$(VBOX_SUFF_LIB)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# VBoxSVC wrapper module
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_XPCOM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVCM_TEMPLATE = VBOXMAINDLL
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifneq ($(BUILD_TARGET),linux)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVCM_INST = $(INST_BIN)components/
7755c0a4b7b215f612d9d27848c2584ffafe7a66vboxsyncVBoxSVCM_DEFS = IN_RING3 IN_CFGLDR_R3
7755c0a4b7b215f612d9d27848c2584ffafe7a66vboxsyncVBoxSVCM_INCS = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_VBoxC) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_CURRENT)
316572fd6bf59ec1038f0476f6536fc10163beebvboxsyncVBoxSVCM_SOURCES = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync -install_name @executable_path/components/VBoxSVCM.dylib \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync -exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TARGET),darwin)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync$(PATH_TARGET)/VBoxSVCM.def:
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync $(RM) -f $@
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync $(APPEND) $@ _NSGetModule
602e0e27740395dba64bee2e0a8aef023ebd7650vboxsyncendif # VBOX_WITH_XPCOM
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# VBoxC module
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_TEMPLATE = VBOXMAINDLL
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifneq ($(filter-out linux win,$(BUILD_TARGET)),)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_INST = $(INST_BIN)components/
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_DEFS = IN_RING3 IN_CFGLDR_R3
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_DEFS += VBOX_COM_INPROC
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncifdef VBOX_WITH_VRDP
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncVBoxC_DEFS += VBOX_VRDP IN_VRDP_R3
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncifdef VBOX_WITH_VRDP_NO_COM
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncVBoxC_DEFS += VRDP_NO_COM
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncifdef VBOX_WITH_HGCM
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_DEFS += VBOX_HGCM
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncifdef VBOX_MAIN_RELEASE_LOG
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_DEFS += VBOX_MAIN_RELEASE_LOG LOG_ENABLED
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncifdef VBOX_WITH_USB
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_DEFS += VBOX_WITH_USB
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_PDMUSB
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_DEFS += VBOX_WITH_PDMUSB
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_ALSA
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_DEFS += VBOX_WITH_ALSA
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncifdef VBOX_WITH_WINMM
78df65edff21c11c537f38e736707ea434ab5623vboxsyncVBoxC_DEFS += VBOX_WITH_WINMM
489fcf2b60b2dfc27a2fcb590aad04ad2c4f9b75vboxsyncifdef VBOX_WITH_CROSSBOW
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncVBoxC_DEFS += VBOX_WITH_CROSSBOW
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncVBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncVBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncVBoxC_INCS = \
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync $(PATH_VBoxC) \
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync $(PATH_VBoxCOM)
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync $(PATH_SUB_CURRENT)
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync -install_name @executable_path/components/VBoxSVCM.dylib \
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync -exported_symbols_list $(PATH_TARGET)/VBoxC.def
78df65edff21c11c537f38e736707ea434ab5623vboxsyncifdef VBOX_USE_VCC80
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_LIBS += \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(LIB_VMM) \
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_SOURCES = \
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsyncifdef VBOX_WITH_XPCOM
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsyncVBoxC_SOURCES += \
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncifdef VBOX_WITH_HGCM
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsyncVBoxC_SOURCES += \
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncifdef VBOX_WITH_USB
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_SOURCES += \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TARGET),darwin)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(RM) -f $@
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(APPEND) $@ _NSGetModule
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(APPEND) $@ _VBoxDriversRegister
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# Version.cpp uses VBOX_SVN_REV.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVersion.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVersion.cpp_DEPS = $(VBOX_SVN_REV_KMK)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncConsoleImpl.cpp_DEFS = VBOX_BUILD_TARGET=\"$(BUILD_TARGET).$(BUILD_TARGET_ARCH)\"
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxXML_TEMPLATE = VBOXMAINDLL
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxXML_SDKS = VBOX_XALAN VBOX_XERCES
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync## @todo Why do we need this? Why isn't it in the template?!?
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxXML_DEFS = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync CFGLDR_HAVE_COM IN_RING3 IN_CFGLDR_R3
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxXML_INCS = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_TARGET)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxXML_SOURCES = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /usr/local/include ## @todo probably belongs in the template
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /usr/local/lib ## @todo probably belongs in the template
84cbac6212750be6733ce171fcdec2e24fd378c8vboxsyncVBoxXML_LDFLAGS.darwin = -install_name @executable_path/VBoxXML.dylib -Wl,-x # no debug info please.
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync## @todo (dmik): temporarily embed SettingsConverter.xsl into VBoxXML,
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync# later it should go to VBoxSVC as well
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncxml/cfgldr.cpp_DEPS = $(PATH_TARGET)/SettingsConverter_xsl.h
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsyncOTHER_CLEAN += $(PATH_TARGET)/SettingsConverter_xsl.h
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync$(PATH_TARGET)/SettingsConverter_xsl.h: xml/SettingsConverter.xsl $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_TARGET))
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync $(QUIET)$(VBOX_BIN2C) SettingsConverter_xsl $< $@
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync# tstCFGLdr - broken.
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsynctstCFGLdr_TEMPLATE = VBOXMAINCLIENTEXE
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsynctstCFGLdr_SDKS = VBOX_XALAN VBOX_XERCES
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsynctstCFGLdr_DEFS = IN_CFGLDR_R3 STANDALONE_TEST
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsynctstCFGLdr_SOURCES = \
84cbac6212750be6733ce171fcdec2e24fd378c8vboxsynctstCFGLdr_INCS = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_TARGET)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# VBoxCOM - COM Abstraction Layer library
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxCOM_TEMPLATE = VBOXMAINLIB
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxCOM_SOURCES = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TARGET),win)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxCOM_SOURCES += \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_VBoxCOM)/VirtualBox_i.c
2c6c9da3f26e8e769901a041f182037452cffafdvboxsync VBoxCOM_INCS += \
2c6c9da3f26e8e769901a041f182037452cffafdvboxsync VBoxCOM_SOURCES += \
11e81238706f1510eabb4be04811da8f87706519vboxsync# Generate _DEPS on all sources which depends on generated headers.
48807baed22246206b9855f41d1fd106f0679b3avboxsyncifeq ($(BUILD_TARGET),win)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncPREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncPREREQS = $(IDLTYPELIB) $(IDLHEADER)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# brute force way to ensure the prereqs are generated before anything is compiled.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncdefine def_src_deps
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(src)_ORDERDEPS += $(PREREQS)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(foreach src,\
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBoxC_SOURCES) $(VBoxC_SOURCES.$(BUILD_TARGET)) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBoxSVC_SOURCES) $(VBoxSVC_SOURCES.$(BUILD_TARGET)) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBoxCOM_SOURCES) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync ,$(eval $(value def_src_deps)))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# Embed XML Schema files to VBoxSVC
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_ENTITIES = $(PATH_TARGET)/VirtualBoxXMLUtil_entities.h
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_ENTITIES_COMMON = $(PATH_TARGET)/VirtualBoxXMLUtil_common_entities.h
c87c6e10b608762972b76bfc734daaec9070b50bvboxsyncVBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMA.darwin = xml/VirtualBox-settings-macosx.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMA.linux = xml/VirtualBox-settings-linux.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMA.freebsd = xml/VirtualBox-settings-freebsd.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMA.win = xml/VirtualBox-settings-windows.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMA.os2 = xml/VirtualBox-settings-os2.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMA.solaris= xml/VirtualBox-settings-solaris.xsd
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVirtualBoxXMLUtil.cpp_DEPS = $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(VBOX_XML_ENTITIES_COMMON): $(VBOX_XML_SCHEMA_COMMON) $(VBOX_BIN2C)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_common_xsd $< $@
7fee49908ea4b9f6cb4f9cc745633c4969ed6318vboxsync$(VBOX_XML_ENTITIES): $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_BIN2C)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,bin2c,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_BIN2C) VirtualBox_settings_xsd $< $@
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncOTHER_CLEAN += $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync# Generate SchemaDefs.h from XML Schema
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBOX_XML_SCHEMADEFS_XSL = xml/SchemaDefs.xsl
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxC_INCS += $(PATH_TARGET)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_DEPS += $(VBOX_XML_SCHEMADEFS_H)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVBoxSVC_INCS += $(PATH_TARGET)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,xsltproc,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_XSLTPROC) -o $@ $(filter-out $(VBOX_XML_SCHEMA_COMMON),$^)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncOTHER_CLEAN += $(VBOX_XML_SCHEMADEFS_H)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync.NOTPARALLEL: $(VBOX_XML_SCHEMADEFS_H)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# Creates the symlinks necessary for making XPCOM work.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync## @todo Figure out why Linux really needs this, darwin doesn't...
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncxpcom-components_INST = $(INST_BIN)components/
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifeq ($(BUILD_TARGET),linux)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncxpcom-components_SYMLINKS = \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxC$(SUFF_DLL)=>../VBoxC$(SUFF_DLL) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxSVCM$(SUFF_DLL)=>../VBoxSVCM$(SUFF_DLL) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VBoxXPCOMIPCC$(SUFF_DLL)=>../VBoxXPCOMIPCC$(SUFF_DLL)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncinclude $(PATH_KBUILD)/footer.kmk
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# Additions rules.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifneq ($(BUILD_TARGET),win)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(IDLFILE): idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,xsltproc,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(MKDIR) -p $(@D)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(IDLTYPELIB): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLTYPELIB)))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,xpidl,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_XPIDL) -m typelib -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(IDLHEADER): $(IDLFILE) | $(call DIRDEP,$(dir $(IDLHEADER)))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,xpidl,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_XPIDL) -m header -I $(VBOX_PATH_XPCOM_IDL) -e $@ $<
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncMAIN_IDL ?= $(EXEC_X86_WIN32) $(firstword $(wildcard \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncIDL_DEFS = /nologo
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncifdef VBOX_WITH_VRDP
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync IDL_DEFS += /D VBOX_VRDP
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(IDLFILE): idl/midl.xsl $(XIDLFILE)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(call MSG_TOOL,xsltproc,VBoxXML,$<,$@)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(MKDIR) -p $(VBOX_PATH_SDK)/idl
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(QUIET)$(VBOX_XSLTPROC) -o $@ $^
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(PATH_TARGET)/VBoxSVC.rgs: win32/VirtualBox_rgs.xsl $(XIDLFILE)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBOX_XSLTPROC) --stringparam Module VBoxSVC -o $@ $^
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(PATH_TARGET)/VBoxC.rgs: win32/VirtualBox_rgs.xsl $(XIDLFILE)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(VBOX_XSLTPROC) --stringparam Module VBoxC -o $@ $^
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# This is kind of obvious when looking at the rule, because it's (a) not specifing all it output
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# and (b) generating more stuff *after* the maintarget has been completed.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync$(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(MAIN_IDL) $(IDL_DEFS) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /out $(subst /,\\,$(PATH_VBoxCOM)) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /cpp_cmd $(subst /,\\,$(TOOL_$(VBOX_VCC_TOOL)_CC)) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /I $(subst /,\\,$(PATH_SDK_WINPSDK_INC)) \
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(subst /,\\,$<)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(MKDIR) -p $(VBOX_PATH_SDK)/include
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(MKDIR) -p $(VBOX_PATH_SDK)/lib
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync $(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync# bird: anyone still using this? If not it's a gonner.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync## Hack to work around wine's trouble with midl.exe and rc.exe (seems to be msvcrt.dll related)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync#gen: $(PREREQS)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync# Translation stuff
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxSVC_HEADERS = \
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxC_HEADERS = \
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxSVC_TRANSLATIONS = \
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncVBoxC_TRANSLATIONS = \
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync $(VBOX_LUPDATE) $(VBoxSVC_SOURCES) $(VBoxSVC_HEADERS) -ts $(VBoxSVC_TRANSLATIONS)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync $(VBOX_LUPDATE) $(VBoxC_SOURCES) $(VBoxC_HEADERS) -ts $(VBoxC_TRANSLATIONS)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncifdef VBOX_WITH_XPCOM
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsynctestidl: $(IDLFILE) $(IDLTYPELIB)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsynctestidlhdr: $(IDLHEADER)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsynctestidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync $(CP) $< $@
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync# Hot fix when dependencies goes bad again...
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync#.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c