Makefile.kmk revision 3fa054c0038fc8f6731129def4437296b773918f
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Makefile for the VBox Main module.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright (C) 2006-2007 innotek GmbH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# available from http://www.virtualbox.org. This file is free software;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# you can redistribute it and/or modify it under the terms of the GNU
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# General Public License as published by the Free Software Foundation,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# distribution. VirtualBox OSE is distributed in the hope that it will
include $(PATH_KBUILD)/header.kmk
OTHERS = $(PATH_BIN)/comregister.cmd
IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox.idl
$(PATH_BIN)/comregister.cmd \
$(VBOX_PATH_SDK)/include/VirtualBox.h \
$(VBOX_PATH_SDK)/lib/VirtualBox.tlb \
$(VBOX_PATH_SDK)/lib/VirtualBox_i.c \
$(PATH_VBoxCOM)/VirtualBox.h \
$(PATH_VBoxCOM)/VirtualBox_i.c \
$(PATH_VBoxCOM)/VirtualBox.tlb
IDLFILE = $(VBOX_PATH_SDK)/idl/VirtualBox_XPCOM.idl
IDLTYPELIB = $(PATH_BIN)/VirtualBox_XPCOM.xpt
IDLTYPELIB = $(PATH_BIN)/components/VirtualBox_XPCOM.xpt
IDLHEADER = $(VBOX_PATH_SDK)/include/VirtualBox_XPCOM.h
docs: $(PATH_TARGET)/docs.Main
$(PATH_TARGET)/docs.Main: \
$(call DIRDEP, $(PATH_OUT)/docs/Main)
$(RM) -f $(wildcard $(PATH_OUT)/docs/Main/html/*)
PATH_OUT="$(PATH_OUT)" PATH_TARGET="$(PATH_TARGET)" PATH_CHM="$(subst /,\\,$(PATH_BIN)/VirtualBoxAPI.chm)" doxygen Doxyfile.Main
-$(EXEC_X86_WIN32) $(VBOX_PATH_HTML_HELP_WORKSHOP)/hhc.exe $(subst /,\\,$(PATH_OUT)/docs/Main/html/index.hhp)
$(APPEND) $(PATH_TARGET)/docs.Main
$(call DIRDEP, $(PATH_OUT)/docs/Main):
VBoxSVC_DEFS.win += VBOX_COM_OUTOFPROC_MODULE
VBoxSVC_DEFS.win.x86 += _WIN32_WINNT=0x0500
VBoxSVC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
VBoxSVC_SOURCES += VRDPServerImpl.cpp
VBoxSVC_LDFLAGS.darwin = -framework IOKit
VBoxSVC_LDFLAGS.linux += -rdynamic # for backtrace_symbols()
-install_name @executable_path/components/VBoxSVCM.dylib \
-exported_symbols_list $(PATH_TARGET)/VBoxSVCM.def
VBoxSVCM_ORDERDEPS += $(PATH_TARGET)/VBoxSVCM.def
VBoxSVCM_CLEAN += $(PATH_TARGET)/VBoxSVCM.def
$(PATH_TARGET)/VBoxSVCM.def:
VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500
VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510
VBoxC_INCS.win := \
-install_name @executable_path/components/VBoxSVCM.dylib \
-exported_symbols_list $(PATH_TARGET)/VBoxC.def
VBoxC_LDFLAGS.win = /MANIFEST
VBoxC_ORDERDEPS += $(PATH_TARGET)/VBoxC.def
VBoxC_CLEAN += $(PATH_TARGET)/VBoxC.def
$(PATH_TARGET)/VBoxC.def: $(MAKEFILE_CURRENT)
VBoxXML_CXXFLAGS.win = -EHsc
VBoxXML_LDFLAGS.darwin = -install_name @executable_path/VBoxXML.dylib -Wl,-x # no debug info please.
## @todo (dmik): temporarily embed SettingsConverter.xsl into VBoxXML,
OTHER_CLEAN += $(PATH_TARGET)/SettingsConverter_xsl.h
$(PATH_TARGET)/SettingsConverter_xsl.h: xml/SettingsConverter.xsl $(VBOX_BIN2C) | $(call DIRDEP,$(PATH_TARGET))
VBoxCOM_DEFS.x86 += _WIN32_WINNT=0x0500
VBoxCOM_DEFS.amd64 += _WIN32_WINNT=0x0510
$(PATH_VBoxCOM)/VirtualBox_i.c
PREREQS = $(PATH_VBoxCOM)/VirtualBox_i.c
VBOX_XML_ENTITIES = $(PATH_TARGET)/VirtualBoxXMLUtil_entities.h
VBOX_XML_ENTITIES_COMMON = $(PATH_TARGET)/VirtualBoxXMLUtil_common_entities.h
VBOX_XML_SCHEMA_COMMON = xml/VirtualBox-settings-common.xsd
VirtualBoxXMLUtil.cpp_DEPS = $(VBOX_XML_ENTITIES) $(VBOX_XML_ENTITIES_COMMON)
# Generate SchemaDefs.h from XML Schema
VBOX_XML_SCHEMADEFS_H = $(PATH_TARGET)/SchemaDefs.h
VBOX_XML_SCHEMADEFS_XSL = xml/SchemaDefs.xsl
$(VBOX_XML_SCHEMADEFS_H): $(VBOX_XML_SCHEMADEFS_XSL) $(VBOX_XML_SCHEMA.$(BUILD_TARGET)) $(VBOX_XML_SCHEMA_COMMON)
include $(PATH_KBUILD)/footer.kmk
XIDLFILE = idl/VirtualBox.xidl
linux/helpers.cpp: $(IDLTYPELIB)
$(IDLFILE): idl/xpidl.xsl $(XIDLFILE) | $(call DIRDEP,$(dir $(IDLFILE)))
$(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
$(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
$(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
$(IDLFILE): idl/midl.xsl $(XIDLFILE)
## @todo r=bird: last changes to this rule showed incorrect dependencies here as it broke testcase (see testboxwin2).
# What needs to be done is to not depend on _i.c in the object subdir, but on all the final outputs.
$(PATH_VBoxCOM)/VirtualBox_i.c: $(IDLFILE) | $(call DIRDEP,$(PATH_VBoxCOM))
$(CP) $(PATH_VBoxCOM)/VirtualBox.h $(VBOX_PATH_SDK)/include
$(CP) $(PATH_VBoxCOM)/VirtualBox.tlb $(VBOX_PATH_SDK)/lib
$(CP) $(PATH_VBoxCOM)/VirtualBox_i.c $(VBOX_PATH_SDK)/lib
testidl: $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c
#.NOTPARALLEL: $(TARGET_VBoxC) $(TARGET_VBoxSVC) $(TARGET_VBoxCOM) $(IDLHEADER) $(IDLFILE) $(PATH_VBoxCOM)/VirtualBox_i.c