Config.kmk revision c05577cf78fa798f48bfad5d32a939f077f9760c
af062818b47340eef15700d2f0211576ba3506eevboxsync# The global build configuration file for VBox.
af062818b47340eef15700d2f0211576ba3506eevboxsync# This file gets included by all makefiles through the
af062818b47340eef15700d2f0211576ba3506eevboxsync# include $(KBUILD_PATH)/header.kmk statement.
af062818b47340eef15700d2f0211576ba3506eevboxsync# Copyright (C) 2006-2014 Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
af062818b47340eef15700d2f0211576ba3506eevboxsync# available from http://www.virtualbox.org. This file is free software;
af062818b47340eef15700d2f0211576ba3506eevboxsync# you can redistribute it and/or modify it under the terms of the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync# General Public License (GPL) as published by the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
af062818b47340eef15700d2f0211576ba3506eevboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
af062818b47340eef15700d2f0211576ba3506eevboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsyncVBOX_ROOT_CONFIG_KMK_INCLUDED = 1
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync# kBuild stuff
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync# Build with umask 022 (requires kBuild r2556 to work, harmless on earlier).
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync$(set-umask 022)
af062818b47340eef15700d2f0211576ba3506eevboxsync# Add our own directories to the search paths.
af062818b47340eef15700d2f0211576ba3506eevboxsyncKBUILD_TOOL_PATHS = $(KBUILD_DEVTOOLS)/kBuildTools/
af062818b47340eef15700d2f0211576ba3506eevboxsync# Modify the build types.
af062818b47340eef15700d2f0211576ba3506eevboxsyncKBUILD_BLD_TYPES = release profile debug kprofile
af062818b47340eef15700d2f0211576ba3506eevboxsync## 'strict' builds
af062818b47340eef15700d2f0211576ba3506eevboxsync# Same as release builds, except that RT_STRICT and VBOX_STRICT are defined,
af062818b47340eef15700d2f0211576ba3506eevboxsync# meaning all assertions are in action. (Appending means '.strict' props take
af062818b47340eef15700d2f0211576ba3506eevboxsync# precedence in argument lists.)
af062818b47340eef15700d2f0211576ba3506eevboxsyncKBUILD_BLD_TYPES += strict
af062818b47340eef15700d2f0211576ba3506eevboxsyncBLD_TYPE_strict_EXTENDS = release
af062818b47340eef15700d2f0211576ba3506eevboxsyncBLD_TYPE_strict_EXTENDS_BY = appending
af062818b47340eef15700d2f0211576ba3506eevboxsync## 'dbgopt' builds
af062818b47340eef15700d2f0211576ba3506eevboxsync# Same as debug builds, except that compiler optimizations are enabled. This
af062818b47340eef15700d2f0211576ba3506eevboxsync# intended for cases where all the debug facitities (logging, assertions, ++)
af062818b47340eef15700d2f0211576ba3506eevboxsync# is wanted but actual source level debugging as important as execution speed.
af062818b47340eef15700d2f0211576ba3506eevboxsyncKBUILD_BLD_TYPES += dbgopt
af062818b47340eef15700d2f0211576ba3506eevboxsyncBLD_TYPE_dbgopt_EXTENDS = debug
af062818b47340eef15700d2f0211576ba3506eevboxsyncBLD_TYPE_dbgopt_EXTENDS_BY = overriding
af062818b47340eef15700d2f0211576ba3506eevboxsync# Temporary hack for kBuild ticket #83.
af062818b47340eef15700d2f0211576ba3506eevboxsync## @todo kBuild: remove after closing ticket #83.
af062818b47340eef15700d2f0211576ba3506eevboxsyncPROPS_ACCUMULATE_L_LNK += INTERMEDIATES
af062818b47340eef15700d2f0211576ba3506eevboxsyncPROPS_PROGRAMS_ACCUMULATE_L += INTERMEDIATES
af062818b47340eef15700d2f0211576ba3506eevboxsyncPROPS_LIBRARIES_ACCUMULATE_L += INTERMEDIATES
af062818b47340eef15700d2f0211576ba3506eevboxsyncPROPS_DLLS_ACCUMULATE_L += INTERMEDIATES
af062818b47340eef15700d2f0211576ba3506eevboxsyncPROPS_SYSMODS_ACCUMULATE_L += INTERMEDIATES
af062818b47340eef15700d2f0211576ba3506eevboxsyncPROPS_MISCBINS_ACCUMULATE_L += INTERMEDIATES
af062818b47340eef15700d2f0211576ba3506eevboxsync# Misc names used bye the install paths below.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PUEL_MANGLED_NAME := Oracle_VM_VirtualBox_Extension_Pack
af062818b47340eef15700d2f0211576ba3506eevboxsync# Install paths
af062818b47340eef15700d2f0211576ba3506eevboxsync## @todo This will change after 4.1 is branched off!
af062818b47340eef15700d2f0211576ba3506eevboxsync# What is now 'bin' and 'lib' will be moved down under 'staged/', except on
af062818b47340eef15700d2f0211576ba3506eevboxsync# darwin where it's currently called 'dist' which will be renamed to 'staged'.
af062818b47340eef15700d2f0211576ba3506eevboxsync# When running 'kmk install' files will be copied to 'dist/', on unix systems
af062818b47340eef15700d2f0211576ba3506eevboxsync# this will be done in FHS fashion assuming /usr/local or /usr as 'prefix'.
af062818b47340eef15700d2f0211576ba3506eevboxsync# Changes related to this are marked VBOX_WITH_NEW_LAYOUT.
af062818b47340eef15700d2f0211576ba3506eevboxsyncifndef VBOX_WITH_NEW_LAYOUT
af062818b47340eef15700d2f0211576ba3506eevboxsync PATH_INS = $(PATH_OUT)/dist
af062818b47340eef15700d2f0211576ba3506eevboxsync PATH_STAGE = $(PATH_OUT)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_DEBUG := stage/debug/
af062818b47340eef15700d2f0211576ba3506eevboxsyncifeq ($(KBUILD_TARGET),darwin)
af062818b47340eef15700d2f0211576ba3506eevboxsync ifndef VBOX_WITH_NEW_LAYOUT
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_DIST = dist/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_DIST :=
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_SDK = $(INST_DIST)sdk/
af062818b47340eef15700d2f0211576ba3506eevboxsync # the bundles
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VIRTUALBOX = $(INST_DIST)VirtualBox.app/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXDRV = $(INST_DIST)VBoxDrv.kext/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXNETFLT = $(INST_DIST)VBoxNetFlt.kext/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXNETADP = $(INST_DIST)VBoxNetAdp.kext/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXUSB = $(INST_DIST)VBoxUSB.kext/
af062818b47340eef15700d2f0211576ba3506eevboxsync # put everything in the VirtualBox app bundle.
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_BIN = $(INST_VIRTUALBOX)Contents/MacOS/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_DLL = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_SYS = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_TESTCASE = $(INST_BIN)testcase/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_ADDITIONS = $(INST_DIST)additions/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_ADDITIONS_ISO = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXDBG_SYMS = $(INST_VIRTUALBOX)Contents/Resources/VBoxDbgSyms/
af062818b47340eef15700d2f0211576ba3506eevboxsync # other paths
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_LIB = lib/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_ADDITIONS_LIB = $(INST_LIB)additions/
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_INST_DTRACE_LIB = $(INST_BIN)dtrace/lib/
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_INST_DTRACE_TST = $(INST_BIN)dtrace/testcase/
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_INST_TOOLS = $(INST_BIN)tools/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_BIN = bin/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_DIST = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_SDK = $(INST_BIN)sdk/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VIRTUALBOX = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXDRV = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXNETFLT = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXNETADP = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXUSB = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_DLL = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_SYS = $(INST_BIN)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_TESTCASE = $(INST_BIN)testcase/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_ADDITIONS = $(INST_BIN)additions/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_ADDITIONS_ISO = $(INST_ADDITIONS)
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_LIB = lib/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_ADDITIONS_LIB = $(INST_LIB)additions/
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_INST_DTRACE_LIB = $(INST_BIN)dtrace/lib/
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_INST_DTRACE_TST = $(INST_BIN)dtrace/testcase/
af062818b47340eef15700d2f0211576ba3506eevboxsync INST_VBOXDBG_SYMS = $(INST_BIN)VBoxDbgSyms/
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_INST_TOOLS = $(INST_BIN)tools/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_VALIDATIONKIT = validationkit/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_TESTBOXSCRIPT = testboxscript/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_DOC = doc/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_EXTPACK = $(INST_BIN)ExtensionPacks/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_EXTPACK_CERTS = $(INST_BIN)ExtPackCertificates/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_EXTPACK_PUEL = $(INST_EXTPACK)$(VBOX_PUEL_MANGLED_NAME)/
af062818b47340eef15700d2f0211576ba3506eevboxsyncINST_PACKAGES = packages/
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_SDK = $(patsubst %/,%,$(PATH_STAGE)/$(INST_SDK))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_DIST = $(patsubst %/,%,$(PATH_STAGE)/$(INST_DIST))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_VALIDATIONKIT = $(patsubst %/,%,$(PATH_STAGE)/$(INST_VALIDATIONKIT))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_ADDITIONS = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_ADDITIONS_ISO = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_ISO))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_ADDITIONS_LIB = $(patsubst %/,%,$(PATH_STAGE)/$(INST_ADDITIONS_LIB))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_EXTPACK_PUEL= $(patsubst %/,%,$(PATH_STAGE)/$(INST_EXTPACK_PUEL))
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PATH_PACKAGES = $(patsubst %/,%,$(PATH_STAGE)/$(INST_PACKAGES))
af062818b47340eef15700d2f0211576ba3506eevboxsync# Delete targets on failure.
af062818b47340eef15700d2f0211576ba3506eevboxsync.DELETE_ON_ERROR:
af062818b47340eef15700d2f0211576ba3506eevboxsync# Notify about important kBuild updates.
af062818b47340eef15700d2f0211576ba3506eevboxsyncif $(KBUILD_VERSION_MAJOR) == 0 \
af062818b47340eef15700d2f0211576ba3506eevboxsync && ( $(KBUILD_VERSION_MINOR) >= 2 \
af062818b47340eef15700d2f0211576ba3506eevboxsync || ( $(KBUILD_VERSION_MINOR) == 1 \
af062818b47340eef15700d2f0211576ba3506eevboxsync && $(KBUILD_VERSION_PATCH) >= 999))
af062818b47340eef15700d2f0211576ba3506eevboxsync if $(KMK_REVISION) >= 2689
af062818b47340eef15700d2f0211576ba3506eevboxsync $(error You must update kBuild! Requires kBuild revision 2577 or later, found $(KMK_REVISION) ($(KBUILD_VERSION)))
af062818b47340eef15700d2f0211576ba3506eevboxsync $(error You must update kBuild! Requires 0.1.999 or later, found $(KBUILD_VERSION))
af062818b47340eef15700d2f0211576ba3506eevboxsync# Define USERNAME early on.
af062818b47340eef15700d2f0211576ba3506eevboxsyncifndef USERNAME
af062818b47340eef15700d2f0211576ba3506eevboxsync USERNAME = $(USER)
af062818b47340eef15700d2f0211576ba3506eevboxsync $(warning Warning: You must have USERNAME or USER in your environment.)
af062818b47340eef15700d2f0211576ba3506eevboxsync# Detect the darwin host version number so we can disable stuff that doesn't
af062818b47340eef15700d2f0211576ba3506eevboxsync# currently build on Lion.
af062818b47340eef15700d2f0211576ba3506eevboxsyncifeq ($(KBUILD_HOST),darwin)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_DARWIN_HOST_VERSION := $(subst ., ,$(shell uname -r))
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_DARWIN_HOST_VERSION_MAJOR := $(expr $(word 1, $(VBOX_DARWIN_HOST_VERSION)) - 4)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_DARWIN_HOST_VERSION_MINOR := $(word 2, $(VBOX_DARWIN_HOST_VERSION))
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_DARWIN_HOST_VERSION_PATCH := $(word 3, $(VBOX_DARWIN_HOST_VERSION))
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_DARWIN_HOST_VERSION := 10.$(VBOX_DARWIN_HOST_VERSION_MAJOR).$(VBOX_DARWIN_HOST_VERSION_MINOR)
af062818b47340eef15700d2f0211576ba3506eevboxsync# The VirtualBox version.
af062818b47340eef15700d2f0211576ba3506eevboxsync# Major version.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VERSION_MAJOR = 4
af062818b47340eef15700d2f0211576ba3506eevboxsync# Minor version.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VERSION_MINOR = 3
af062818b47340eef15700d2f0211576ba3506eevboxsync# This is the current build number. It should be increased every time we publish a
af062818b47340eef15700d2f0211576ba3506eevboxsync# new build. The define is available in every source file. Only even build numbers
af062818b47340eef15700d2f0211576ba3506eevboxsync# will be published, odd numbers are set during development.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VERSION_BUILD = 53
af062818b47340eef15700d2f0211576ba3506eevboxsync# The raw version string. This *must not* contain any other information/fields than
af062818b47340eef15700d2f0211576ba3506eevboxsync# major, minor and build revision (as it is now) -- also will be used for host/guest version
af062818b47340eef15700d2f0211576ba3506eevboxsync# comparison.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VERSION_STRING_RAW = $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)
af062818b47340eef15700d2f0211576ba3506eevboxsync# This can be overridden in LocalConfig.kmk or elsewhere.
af062818b47340eef15700d2f0211576ba3506eevboxsync# For the convension, see checks near the end of Config.kmk.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_BUILD_PUBLISHER =
af062818b47340eef15700d2f0211576ba3506eevboxsync# Full version string (may include more than just x.y.z, but no spaces or other problematic chars).
af062818b47340eef15700d2f0211576ba3506eevboxsync# Note! The BETA[n],ALPHA[n],RC[n] indicators should be inserted before the
af062818b47340eef15700d2f0211576ba3506eevboxsync# publisher so that RTStrVersionCompare have a chance of comparing
af062818b47340eef15700d2f0211576ba3506eevboxsync# prerelease from different publishers correctly.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VERSION_STRING = $(VBOX_VERSION_STRING_RAW)$(VBOX_BUILD_PUBLISHER)
af062818b47340eef15700d2f0211576ba3506eevboxsync# Force the additions.sh script to get an exact additions build when we're doing the release.
af062818b47340eef15700d2f0211576ba3506eevboxsyncifeq ($(int-mod $(VBOX_VERSION_BUILD),2),0)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_RELEASE_EXACT_MATCH=1
af062818b47340eef15700d2f0211576ba3506eevboxsyncifneq ($(VBOX_RELEASE_EXACT_MATCH),)
af062818b47340eef15700d2f0211576ba3506eevboxsync export VBOX_ADDITIONS_SH_MODE = release
af062818b47340eef15700d2f0211576ba3506eevboxsync export VBOX_DOCUMENTATION_SH_MODE = release
af062818b47340eef15700d2f0211576ba3506eevboxsync export VBOX_EFI_SH_MODE = release
af062818b47340eef15700d2f0211576ba3506eevboxsync export VBOX_EXTPACKS_SH_MODE = release
af062818b47340eef15700d2f0211576ba3506eevboxsync# Some info on the vendor
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VENDOR = Oracle Corporation
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_VENDOR_SHORT = Oracle
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PRODUCT = Oracle VM VirtualBox
af062818b47340eef15700d2f0211576ba3506eevboxsync# Not all could be done automatically. Here is a list of known places which
af062818b47340eef15700d2f0211576ba3506eevboxsync# have to be updated manually, please keep this up to date:
af062818b47340eef15700d2f0211576ba3506eevboxsync# src/VBox/RDP/webclient/flash/com/sun/network/rdp/Version.as
af062818b47340eef15700d2f0211576ba3506eevboxsync# src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
af062818b47340eef15700d2f0211576ba3506eevboxsync# src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsLanguage.cpp
af062818b47340eef15700d2f0211576ba3506eevboxsync# src/VBox/Additions/WINNT/Installer/ISO/ReadmeDrivers.txt
af062818b47340eef15700d2f0211576ba3506eevboxsync# */*.inf, */*.rc
af062818b47340eef15700d2f0211576ba3506eevboxsync# Maybe we want set this manually.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_C_YEAR = $(date-utc %Y)
af062818b47340eef15700d2f0211576ba3506eevboxsync# The VirtualBox package type.
af062818b47340eef15700d2f0211576ba3506eevboxsyncifeq ($(KBUILD_TARGET),win)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = WINDOWS
af062818b47340eef15700d2f0211576ba3506eevboxsyncelse ifeq ($(KBUILD_TARGET),linux)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = LINUX
af062818b47340eef15700d2f0211576ba3506eevboxsyncelse ifeq ($(KBUILD_TARGET),darwin)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = DARWIN
af062818b47340eef15700d2f0211576ba3506eevboxsyncelse ifeq ($(KBUILD_TARGET),solaris)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = SOLARIS
af062818b47340eef15700d2f0211576ba3506eevboxsyncelse ifeq ($(KBUILD_TARGET),os2)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = OS2
af062818b47340eef15700d2f0211576ba3506eevboxsyncelse ifeq ($(KBUILD_TARGET),haiku)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = HAIKU
af062818b47340eef15700d2f0211576ba3506eevboxsyncelse if1of ($(KBUILD_TARGET), dragonfly freebsd netbsd openbsd)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_OS = BSD
af062818b47340eef15700d2f0211576ba3506eevboxsync $(error Cannot determine VBOX_PACKAGE_OS)
af062818b47340eef15700d2f0211576ba3506eevboxsyncifeq ($(KBUILD_TARGET_ARCH),x86)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_ARCH = 32BITS
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_PACKAGE_ARCH = 64BITS
af062818b47340eef15700d2f0211576ba3506eevboxsync# distribution, mostly for Linux/Solaris where we support different distributions
af062818b47340eef15700d2f0211576ba3506eevboxsync# this strip will be overridden by the Linux packaging scripts
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PACKAGE_DIST ?= GENERIC
af062818b47340eef15700d2f0211576ba3506eevboxsync# Full string
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_PACKAGE_STRING = $(VBOX_PACKAGE_OS)_$(VBOX_PACKAGE_ARCH)_$(VBOX_PACKAGE_DIST)
af062818b47340eef15700d2f0211576ba3506eevboxsync# The VirtualBox Configuration Defaults.
af062818b47340eef15700d2f0211576ba3506eevboxsync# We try to document all the build configuration options here, thing which
af062818b47340eef15700d2f0211576ba3506eevboxsync# aren't enabled by default is left commented out just to show that they
af062818b47340eef15700d2f0211576ba3506eevboxsync# exist and which value they should have (usually 1, but anyway).
af062818b47340eef15700d2f0211576ba3506eevboxsync## @name Additions
af062818b47340eef15700d2f0211576ba3506eevboxsync# This indicates that additions (of some kind or another) is being _built_.
af062818b47340eef15700d2f0211576ba3506eevboxsync# VBOX_WITHOUT_ADDITIONS overrides it.
af062818b47340eef15700d2f0211576ba3506eevboxsyncVBOX_WITH_ADDITIONS = 1
af062818b47340eef15700d2f0211576ba3506eevboxsync# Build the optional ring-0 part of the additions for syntax checking.
af062818b47340eef15700d2f0211576ba3506eevboxsync# (Except when cross-building on linux since we're using /usr/src/...)
af062818b47340eef15700d2f0211576ba3506eevboxsyncifn1of ($(KBUILD_TARGET).$(KBUILD_HOST_ARCH).$(KBUILD_TARGET_ARCH), linux.x86.amd64 linux.amd64.x86)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_WITH_ADDITION_DRIVERS = 1
af062818b47340eef15700d2f0211576ba3506eevboxsync# Build X11 additions. Can be disabled separately.
af062818b47340eef15700d2f0211576ba3506eevboxsyncif1of ($(KBUILD_TARGET), dragonfly freebsd linux netbsd openbsd solaris)
af062818b47340eef15700d2f0211576ba3506eevboxsync VBOX_WITH_X11_ADDITIONS = 1
af062818b47340eef15700d2f0211576ba3506eevboxsync# Enable the building of shared folders in the windows additions.
# This is not used by makefiles, only Config.kmk, see below.
# Include CHM when building docs (unset in LocalConfig.kmk to suppress CHM)
# This is not used by makefiles, only Config.kmk, see below.
# Enable the virtual SATA/AHCI controller
# Enable the hal/sysfs USB code on Linux.
# VirtualKD stub/loader device, only relevant on Windows host
# The kernel driver/module and related runtime libraries.
ifeq ($(filter win.amd64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) # too much work with freetype and all that.
if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 linux.x86 linux.amd64 solaris.amd64 win.x86 win.amd64)
# Enable the host/guest information service (aka guest properties).
if1of ($(KBUILD_TARGET), darwin freebsd linux solaris) ## @todo this should be set and used on windows too.
# Enables VMMR0.r0 (++) loading using the native loader on solaris.
if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 linux.x86 linux.amd64 win.x86 win.amd64)
# Most developers will want to disable this in their LocalConfig.kmk.
#VBOX_PATH_APP_PRIVATE = /usr/lib/virtualbox
VBOX_PATH_APP_PRIVATE = /opt/VirtualBox
VBOX_PATH_APP_PRIVATE = /Applications/VirtualBox.app/Contents/MacOS
VBOX_PATH_APP_PRIVATE = /usr/local/lib/virtualbox
VBOX_PATH_APP_PRIVATE = /boot/system/apps/VirtualBox
#VBOX_PATH_APP_PRIVATE_ARCH = /usr/lib/virtualbox
VBOX_PATH_APP_PRIVATE_ARCH = $(VBOX_PATH_APP_PRIVATE_ARCH_TOP)/$(if-expr $(KBUILD_TARGET_ARCH) == "amd64",amd64,i386)
#VBOX_PATH_SHARED_LIBS = /usr/lib
VBOX_PATH_SHARED_LIBS = $(VBOX_PATH_APP_PRIVATE)/$(if-expr $(KBUILD_TARGET_ARCH) == "amd64",amd64,i386)
#VBOX_PATH_APP_DOCS = /usr/share/doc/virtualbox
# The DT_RPATH/DT_RUNPATH to embed into the binaries (ELF).
#VBOX_WITH_RUNPATH = /usr/lib/virtualbox
# Enable use of the $ORIGIN DT_RPATH/DT_RUNPATH feature (ELF).
# Enable the system wide support service/daemon.
# the debug packages containing symbols for gdb located in /usr/lib/debug.
# to/from the guest in raw mode. Modern Linux kernels use the performance counter
VBOX_BRAND_BIOS_LOGO := $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/puel_logo.bmp
VBOX_BRAND_LICENSE_HTML := $(PATH_ROOT)/doc/License-gpl-2.0.html
VBOX_BRAND_LICENSE_RTF := $(PATH_ROOT)/doc/License-gpl-2.0.rtf
VBOX_BRAND_LICENSE_TXT := $(PATH_ROOT)/doc/License-gpl-2.0.txt
VBOX_BRAND_GUI_ABOUT_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/about.png
VBOX_BRAND_GUI_ABOUT_HIDPI_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/hidpi/NonOSE/about_hidpi.png
VBOX_BRAND_GUI_ABOUT_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/about_16px.png
VBOX_BRAND_GUI_VBOX_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_16px.png
VBOX_BRAND_GUI_VBOX_20PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_20px.png
VBOX_BRAND_GUI_VBOX_32PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_32px.png
VBOX_BRAND_GUI_VBOX_40PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_40px.png
VBOX_BRAND_GUI_VBOX_48PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_48px.png
VBOX_BRAND_GUI_VBOX_64PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/NonOSE/VirtualBox_64px.png
VBOX_BRAND_GUI_VBOX_SVG := $(PATH_ROOT)/src/VBox/Resources/NonOSE/virtualbox.svg
VBOX_BRAND_WIN_INST_DLGJPG := $(PATH_ROOT)/src/VBox/Installer/win/Binary/Dialog.jpg
VBOX_BRAND_WIN_ADD_INST_DLGBMP := $(PATH_ROOT)/src/VBox/Additions/WINNT/Installer/welcome.bmp
VBOX_BRAND_DARWIN_DISKIMAGE_DS_STORE := $(PATH_ROOT)/src/VBox/Installer/darwin/DiskImage/DS_Store
VBOX_BRAND_DARWIN_DISKIMAGE_BG := $(PATH_ROOT)/src/VBox/Installer/darwin/DiskImage/vbox_folder.tiff
VBOX_BRAND_DARWIN_INSTALLER_BG := $(PATH_ROOT)/src/VBox/Installer/darwin/VirtualBox_mpkg/background.tif
# We'll use the native html/help viewer.
# We'll use the native html/help viewer.
AUTOCFG := $(wildcard $(PATH_ROOT)/AutoConfig.kmk)
LOCALCFG := $(wildcard $(PATH_ROOT)/LocalConfig.kmk)
$(warning VBOX_WITHOUT_LINUX_COMPILER_H was renamed to VBOX_WITH_LINUX_COMPILER_H, the meaning is inverted.)
VBOX_BRAND_LICENSE_HTML := $(PATH_ROOT)/doc/License-gpl-2.0.html
VBOX_BRAND_LICENSE_RTF := $(PATH_ROOT)/doc/License-gpl-2.0.rtf
VBOX_BRAND_LICENSE_TXT := $(PATH_ROOT)/doc/License-gpl-2.0.txt
VBOX_BRAND_BIOS_LOGO := $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/ose_logo.bmp
VBOX_BRAND_GUI_ABOUT_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/about.png
VBOX_BRAND_GUI_ABOUT_HIDPI_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/about.png
VBOX_BRAND_GUI_ABOUT_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/about_16px.png
VBOX_BRAND_GUI_VBOX_16PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_16px.png
VBOX_BRAND_GUI_VBOX_20PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_20px.png
VBOX_BRAND_GUI_VBOX_32PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_32px.png
VBOX_BRAND_GUI_VBOX_40PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_40px.png
VBOX_BRAND_GUI_VBOX_48PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png
VBOX_BRAND_GUI_VBOX_64PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_64px.png
VBOX_BRAND_GUI_CUBE_42PX_PNG := $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_cube_42px.png
VBOX_BRAND_GUI_VBOX_SVG := $(PATH_ROOT)/src/VBox/Resources/OSE/virtualbox.svg
# VBOX_WITHOUT_HARDENING is for developers (put in LocalConfig.kmk).
VBOX_JAVA_PACKAGE = org.virtualbox$(VBOX_API_SUFFIX)
# (yasm/nasm) and possibly two different formats (32-bit/64-bit).
VBOX_LDR_FMT_2_YASM_DBGINFO.elf = -g dwarf2
VBOX_LDR_FMT_2_YASM_DBGINFO.lx = -g stabs
VBOX_LDR_FMT_2_YASM_DBGINFO.pe = -g cv8
VBOX_ASFLAGS = $(VBOX_ASFLAGS_FMT) -D__YASM__ -Worphan-labels $(VBOX_YASM_Wno-segreg-in-64bit) $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT))
VBOX_ASFLAGS32 = $(VBOX_ASFLAGS_FMT32) -D__YASM__ -Worphan-labels $(VBOX_YASM_Wno-segreg-in-64bit) $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT32))
VBOX_ASFLAGS64 = $(VBOX_ASFLAGS_FMT64) -D__YASM__ -Worphan-labels $(VBOX_YASM_Wno-segreg-in-64bit) $(VBOX_LDR_FMT_2_YASM_DBGINFO.$(VBOX_LDR_FMT64))
TOOL_GXX3PLAIN_LD_SYSMOD ?= /usr/ccs/bin/ld
else ifeq ($(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH),amd64.x86)
$(error VBox: VBOX_VCC_TOOL_STEM='$(VBOX_VCC_TOOL_STEM)' is not supported, only VCC100 and VCC110 is)
TOOL.win.x86 = $(VBOX_VCC_TOOL_STEM)X86
TOOL.win.amd64 = $(VBOX_VCC_TOOL_STEM)AMD64
DEFS.debug := DEBUG DEBUG_$(subst $(subst _, ,_),_,$(USERNAME)) DEBUG_USERNAME=$(subst $(subst _, ,_),_,$(USERNAME))
DEFS.profile = VBOX_WITH_STATISTICS
DEFS.strict = RT_STRICT VBOX_STRICT
DEFS.x86 = RT_ARCH_X86 __X86__
DEFS.amd64 = RT_ARCH_AMD64 __AMD64__
DEFS.darwin = RT_OS_DARWIN __DARWIN__
DEFS.freebsd = RT_OS_FREEBSD __FREEBSD__
DEFS.haiku = RT_OS_HAIKU
DEFS.linux = RT_OS_LINUX _FILE_OFFSET_BITS=64
DEFS.netbsd = RT_OS_NETBSD
DEFS.openbsd = RT_OS_OPENBSD
DEFS.os2 = RT_OS_OS2 __OS2__
DEFS.solaris = RT_OS_SOLARIS _FILE_OFFSET_BITS=64
DEFS.win = RT_OS_WINDOWS __WIN__
DEFS.win.x86 = __WIN32__
DEFS.win.amd64 = __WIN64__
VBOX_GCC_WARN ?= -Wall $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) -Wno-unused -Wno-trigraphs $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-unused-parameter)
VBOX_GCC_PEDANTIC_CXX ?= -pedantic -Wshadow $(VBOX_GCC_WARN_PEDANTIC) -Wno-long-long $(VBOX_GCC_Wno-delete-non-virtual-dtor)
VBOX_GCC_PEDANTIC_C ?= -pedantic -Wshadow $(VBOX_GCC_WARN_PEDANTIC) -Wno-long-long -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Werror-implicit-function-declaration
LIB_RUNTIME = $(PATH_STAGE_BIN)/VBoxRT.dylib
LIB_RUNTIME_EF = #$(PATH_STAGE_LIB)/RuntimeEFCPP.a
VBOX_LIB_RUNTIME_X86 = $(PATH_STAGE_BIN)/VBoxRT-x86.dylib
LIB_KPROFILE = $(PATH_STAGE_BIN)/kPrf2.dylib
LIB_VMM = $(PATH_STAGE_BIN)/VBoxVMM.dylib
LIB_VMMGC = $(PATH_STAGE_BIN)/VMMGC.gc
LIB_REM = $(PATH_STAGE_LIB)/VBoxREM.dylib
LIB_XPCOM = $(PATH_STAGE_BIN)/VBoxXPCOM.dylib
VBOX_LIB_XPCOM_X86 = $(PATH_STAGE_BIN)/VBoxXPCOM-x86.dylib
LIB_DDU = $(PATH_STAGE_BIN)/VBoxDDU.dylib
LIB_RUNTIME = $(PATH_STAGE_BIN)/VBoxRT.so
LIB_RUNTIME_EF = $(PATH_STAGE_LIB)/RuntimeEFCPP.a
VBOX_LIB_RUNTIME_X86 = $(PATH_STAGE_BIN)/VBoxRT-x86.so
LIB_KPROFILE = $(PATH_STAGE_BIN)/kPrf2.so
LIB_VMM = $(PATH_STAGE_BIN)/VBoxVMM.so
LIB_VMMGC = $(PATH_STAGE_BIN)/VMMGC.gc
LIB_REM = $(PATH_STAGE_LIB)/VBoxREM.so
LIB_XPCOM = $(PATH_STAGE_BIN)/VBoxXPCOM.so
VBOX_LIB_XPCOM_X86 = $(PATH_STAGE_BIN)/VBoxXPCOM-x86.so
LIB_DDU = $(PATH_STAGE_BIN)/VBoxDDU.so
LIB_RUNTIME = $(PATH_STAGE_BIN)/VBoxRT.dll
LIB_RUNTIME_EF = #$(PATH_STAGE_LIB)/RuntimeEFCPP.a
VBOX_LIB_RUNTIME_X86 = $(PATH_STAGE_BIN)/VBoxRT-x86.dll
LIB_KPROFILE = $(PATH_STAGE_BIN)/kPrf2.dll
LIB_VMM = $(PATH_STAGE_BIN)/VBoxVMM.dll
LIB_VMMGC = $(PATH_STAGE_LIB)/VMMRCImp.lib
LIB_REM = $(PATH_STAGE_LIB)/VBoxREMImp.lib
LIB_XPCOM = $(PATH_STAGE_BIN)/VBoxXCOM.dll
VBOX_LIB_XPCOM_X86 = $(PATH_STAGE_BIN)/VBoxXPCOM-x86.dll
LIB_DDU = $(PATH_STAGE_BIN)/VBoxDDU.dll
VBOX_OBJ_SYS0 = $(PATH_OBJ)/RuntimeR0/os2/sys0.obj
LIB_RUNTIME = $(PATH_STAGE_LIB)/VBoxRT.lib
LIB_RUNTIME_EF = #$(PATH_STAGE_LIB)/RuntimeEFCPP.lib
VBOX_LIB_RUNTIME_X86 = $(PATH_STAGE_LIB)/VBoxRT-x86.lib
LIB_KPROFILE = $(PATH_STAGE_LIB)/kPrf2.lib
LIB_VMM = $(PATH_STAGE_LIB)/VBoxVMM.lib
LIB_VMMGC = $(PATH_OBJ)/VMMRC/VMMGC.lib
LIB_REM = $(PATH_STAGE_LIB)/VBoxREMImp.lib
LIB_XPCOM = $(PATH_STAGE_BIN)/VBoxXPCOM.lib
VBOX_LIB_XPCOM_X86 = $(PATH_STAGE_BIN)/VBoxXPCOM-x86.lib
LIB_DDU = $(PATH_STAGE_LIB)/VBoxDDU.lib
VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) \
# pylint setup, see http://www.logilab.org/857.
# W0511 - TODO/XXX/FIXME/+++.
VBOX_PYLINT := $(firstword $(which pylint-2.7) $(which pylint-2.6) $(which pylint2) $(which pylint))
--rcfile=$(PATH_ROOT)/tools/pylintrc \
--module-rgx='(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(td[A-Z][a-zA-Z0-9]+)|(t(e|)st(-|)[a-zA-Z0-9]+))$(DOLLAR)' \
--const-rgx='(g_(k|)[abcdefhmnpilorstu]+[A-Z][a-zA-Z0-9]+|[A-Z_][A-Z0-9_]+|__copyright__|__version__|__file__|__all__)$(DOLLAR)' \
$(if-expr !defined(VBOX_WITH_PYLINT_PRE_V1_0),--class-attribute-rgx='(k[abcdefhmnpilorstu]+[A-Z0-9][a-zA-Z0-9_]{0,32}|[A-Z_][A-Z0-9_]{2,32})',) \
$(if-expr defined(VBOX_WITH_PYLINT_V1_1_PLUS) || defined(VBOX_WITH_PYLINT_V1_2_1_PLUS),--disable=C0326,) \
--ignored-classes=testdriver.vboxcon \
# Enable C++ electric fence heap. (Warning: will easily run out of virtual memory / kernel stuff on Linux/Windows.)
VBOX_XCURSOR_LIBS := $(lastword $(wildcard $(PATH_DEVTOOLS_TRG)/libXcursor/*/lib/libXcursor.a))
VBOX_XCURSOR_INCS := $(patsubst %/lib/libXcursor.a,%/include, $(VBOX_XCURSOR_LIBS))
VBOX_IASLCMD ?= $(firstword $(wildcard $(PATH_DEVTOOLS_BLD)/bin/iasl$(HOSTSUFF_EXE)) iasl$(HOSTSUFF_EXE))
VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/win.x86/bin/xsltproc.exe
VBOX_XSLTPROC ?= BEGINLIBPATH="$(PATH_DEVTOOLS_BLD)/bin;$$BEGINLIBPATH" $(PATH_DEVTOOLS_BLD)/bin/xsltproc.exe
VBOX_XSLTPROC ?= $(PATH_DEVTOOLS)/haiku.x86/bin/xsltproc
VBOX_BIN2C ?= $(PATH_OBJ)/bin2c/bin2c$(HOSTSUFF_EXE)
VBOX_RTMANIFEST ?= $(PATH_OBJ)/bldRTManifest/bldRTManifest$(HOSTSUFF_EXE)
VBOX_RTSIGNTOOL ?= $(PATH_OBJ)/bldRTSignTool/bldRTSignTool$(HOSTSUFF_EXE)
# VBoxCmp (simple /bin/cmp with more sensible output)
VBOX_VBOXCMP ?= $(PATH_OBJ)/VBoxCmp/VBoxCmp$(HOSTSUFF_EXE)
VBOX_VBOXCPP ?= $(PATH_OBJ)/VBoxCPP/VBoxCPP$(HOSTSUFF_EXE)
VBOX_VBOXTPG ?= $(PATH_OBJ)/VBoxTpG/VBoxTpG$(HOSTSUFF_EXE)
VBOX_PE_SET_VERSION ?= $(PATH_OBJ)/VBoxPeSetVersion/VBoxPeSetVersion$(HOSTSUFF_EXE)
# Visual C++ EditBin.exe.
VBOX_VCC_EDITBIN = $(if $(PATH_TOOL_$(VBOX_VCC_TOOL)_BIN),$(PATH_TOOL_$(VBOX_VCC_TOOL)_BIN)/,)editbin.exe /NoLogo
VBOX_FILESPLIT ?= $(PATH_OBJ)/filesplitter/filesplitter$(HOSTSUFF_EXE)
VBOX_BIOSSUMS ?= $(PATH_OBJ)/biossums/biossums$(HOSTSUFF_EXE)
VBOX_MAKE_ALTERNATIVE_SOURCE ?= $(PATH_OBJ)/MakeAlternativeSource/MakeAlternativeSource$(HOSTSUFF_EXE)
VBOX_DEF_2_LAZY_LOAD ?= $(PATH_OBJ)/VBoxDef2LazyLoad/VBoxDef2LazyLoad$(HOSTSUFF_EXE)
VBOX_MKISOFS ?= $(PATH_DEVTOOLS_BLD)/bin/mkisofs.exe
VBOX_MAKESELF ?= $(PATH_DEVTOOLS)/common/makeself/v2.1.5/makeself.sh
VBOX_PATH_HTML_HELP_WORKSHOP ?= $(PATH_DEVTOOLS)/win.x86/HTML_Help_Workshop/v1.3/
VBOX_PATH_NSIS ?= $(PATH_DEVTOOLS)/win.x86/nsis/v2.46-log-nsscm-r1
VBOX_PATH_AUTOIT3 ?= $(PATH_DEVTOOLS)/win.x86/autoit/v3.2.10.0
VBOX_PATH_WIX ?= $(PATH_DEVTOOLS)/win.x86/wix/v3.8.1128.0
VBOX_PATH_MSITRAN ?= $(PATH_DEVTOOLS)/win.x86/sdk/v7.1/Bin/MsiTran.Exe
VBOX_PATH_MSIDB ?= $(PATH_DEVTOOLS)/win.x86/sdk/v7.1/Bin/MsiDb.Exe
VBOX_PATH_WISUBSTG ?= $(PATH_DEVTOOLS)/win.x86/sdk/v7.1/Samples/sysmgmt/msi/scripts/WiSubStg.vbs
VBOX_PATH_WISUMINFO ?= $(PATH_DEVTOOLS)/win.x86/sdk/v7.1/Samples/sysmgmt/msi/scripts/WiSumInf.vbs
VBOX_PATH_DIFX ?= $(PATH_DEVTOOLS)/win.$(KBUILD_TARGET_ARCH)/DIFx/v2.1-r3
VBOX_PATH_CABSDK ?= $(PATH_DEVTOOLS)/win.x86/cabsdk/r1
VBOX_PATH_MAKECAB ?= $(VBOX_PATH_CABSDK)/BIN/MAKECAB.EXE
VBOX_WIN_MIDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard $(addsuffix /[Mm][Ii][Dd][Ll].[Ee][Xx][Ee], \
$(PATH_DEVTOOLS)/win.x86/sdk/v7.1/Bin$(if-expr "$(KBUILD_HOST).$(KBUILD_HOST_ARCH)" == "win.amd64",/x64,) \
$(PATH_DEVTOOLS)/win.x86/bin \
# if updating, also update xpidl_INST var in src/libs/xpcom18a4/Makefile.kmk
VBOX_PATH_XPCOM_IDL ?= $(VBOX_PATH_SDK)/bindings/xpcom/idl
$(VBOX_PATH_SDK)/bindings/xpcom/include \
$(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
$(VBOX_PATH_SDK)/bindings/xpcom/include/string \
$(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom \
$(VBOX_PATH_SDK)/bindings/xpcom/include/nsprpub \
$(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd
export VBOX_LIBIDL_CONFIG := $(firstword $(shell which libIDL-config-2 libIDL-config 2> /dev/null))
VBOX_LIBPATH_X11 ?= /usr/X11R6/lib
VBOX_PATH_MACOSX_SDK ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN)u.sdk
VBOX_XCODE_VERSION := $(word 2, $(shell $(VBOX_PATH_MACOSX_DEVEL_ROOT)/usr/bin/xcodebuild -version))
TOOL_GCC4MACHO_PREFIX := $(VBOX_PATH_MACOSX_DEVEL_ROOT)/usr/bin/$(TOOL_GCC4MACHO_PREFIX)
TOOL_GXX4MACHO_PREFIX := $(VBOX_PATH_MACOSX_DEVEL_ROOT)/usr/bin/$(TOOL_GXX4MACHO_PREFIX)
export PATH:=$(VBOX_PATH_MACOSX_DEVEL_ROOT)/usr/bin/:$(PATH)
## @todo WTF do we do the -m32/64 stuff here for these compilers? Also the visibility should be elsewhere...
TOOL_GXX4MACHO_OBJC = $(TOOL_GCC4MACHO_PREFIX)gcc$(TOOL_GCC4MACHO_SUFFIX) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden
TOOL_GXX4MACHO_OBJCXX = $(TOOL_GCC4MACHO_PREFIX)gcc$(TOOL_GCC4MACHO_SUFFIX) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden -fvisibility-inlines-hidden
VBOX_DARWIN_DEF_SDK_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0 \
VBOX_DARWIN_DEF_SDK_CFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
VBOX_DARWIN_DEF_SDK_CXXFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
VBOX_DARWIN_DEF_SDK_OBJCFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
VBOX_DARWIN_DEF_SDK_OBJCXXFLAGS := -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -isysroot $(VBOX_PATH_MACOSX_SDK)
VBOX_DARWIN_DEF_SDK_LDFLAGS = -mmacosx-version-min=$(VBOX_DEF_MACOSX_VERSION_MIN) -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK) \
## @todo s/VBOX_DARWIN_DEF_SDK_10/VBOX_DARWIN_SDK_10/g
VBOX_PATH_MACOSX_SDK_10_4 ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.4u.sdk
VBOX_DARWIN_DEF_SDK_10_4_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1040 MAC_OS_X_VERSION_MAX_ALLOWED=1040
VBOX_DARWIN_DEF_SDK_10_4_CXXFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
VBOX_DARWIN_DEF_SDK_10_4_OBJCFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
VBOX_DARWIN_DEF_SDK_10_4_OBJCXXFLAGS := -mmacosx-version-min=10.4 -isysroot $(VBOX_PATH_MACOSX_SDK_10_4)
VBOX_DARWIN_DEF_SDK_10_4_LDFLAGS := -mmacosx-version-min=10.4 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_4) \
VBOX_PATH_MACOSX_SDK_10_5 ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.5.sdk
VBOX_DARWIN_DEF_SDK_10_5_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1050 MAC_OS_X_VERSION_MAX_ALLOWED=1050
VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
VBOX_DARWIN_DEF_SDK_10_5_OBJCXXFLAGS := -mmacosx-version-min=10.5 -isysroot $(VBOX_PATH_MACOSX_SDK_10_5)
VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS := -mmacosx-version-min=10.5 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_5) \
VBOX_PATH_MACOSX_SDK_10_6 ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.6.sdk
VBOX_DARWIN_DEF_SDK_10_6_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1060 MAC_OS_X_VERSION_MAX_ALLOWED=1060
VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
VBOX_DARWIN_DEF_SDK_10_6_OBJCFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
VBOX_DARWIN_DEF_SDK_10_6_OBJCXXFLAGS := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS := -mmacosx-version-min=10.6 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_6) \
ifneq ($(wildcard $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.7.sdk),)
VBOX_PATH_MACOSX_SDK_10_7 = $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.7.sdk
VBOX_PATH_MACOSX_SDK_10_7 = $(PATH_DEVTOOLS)/darwin.x86/SDKs/MacOSX10.7.sdk
VBOX_DARWIN_DEF_SDK_10_7_DEFS := MAC_OS_X_VERSION_MIN_REQUIRED=1070 MAC_OS_X_VERSION_MAX_ALLOWED=1070
VBOX_DARWIN_DEF_SDK_10_7_CXXFLAGS := -mmacosx-version-min=10.7 -isysroot $(VBOX_PATH_MACOSX_SDK_10_7)
VBOX_DARWIN_DEF_SDK_10_7_OBJCFLAGS := -mmacosx-version-min=10.7 -isysroot $(VBOX_PATH_MACOSX_SDK_10_7)
VBOX_DARWIN_DEF_SDK_10_7_OBJCXXFLAGS := -mmacosx-version-min=10.7 -isysroot $(VBOX_PATH_MACOSX_SDK_10_7)
VBOX_DARWIN_DEF_SDK_10_7_LDFLAGS := -mmacosx-version-min=10.7 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_7) \
# Macro switching between @executable_path, @rpath and /Applications/VirtualBox.app
# VBOX_GCC_RPATH_OPT - Different GCC/LD combinations needs different options.
VBOX_PATH_X11_ROOT = $(PATH_ROOT)/src/VBox/Additions/x11/x11include
VBOX_PATH_CROGL_GLAPI = $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/glapi_parser
VBOX_PATH_CROGL_INCLUDE = $(PATH_ROOT)/src/VBox/GuestHost/OpenGL/include
VBOX_PATH_CROGL_PYTHON_INCLUDE = $(VBOX_PATH_CROGL_GLAPI);$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer;$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
VBOX_PATH_CROGL_PYTHON_INCLUDE = $(VBOX_PATH_CROGL_GLAPI):$(PATH_ROOT)/src/VBox/GuestHost/OpenGL/packer:$(PATH_ROOT)/src/VBox/HostServices/SharedOpenGL/crserverlib
VBOX_LIB_OGL_CRUTIL = $(PATH_OBJ)/VBoxOGLcrutil/VBoxOGLcrutil$(VBOX_SUFF_LIB)
VBOX_LIB_OGL_HOSTCRUTIL = $(PATH_OBJ)/VBoxOGLhostcrutil/VBoxOGLhostcrutil$(VBOX_SUFF_LIB)
VBOX_LIB_OGL_CRUTIL_X86 = $(PATH_OBJ)/VBoxOGLcrutil-x86/VBoxOGLcrutil-x86$(VBOX_SUFF_LIB)
# VBOX_PATH_MESA_SOURCE = $(PATH_ROOT)/src/libs/mesa-7.2
$(VBOX_PATH_MESA_SOURCE)/src/mesa/ \
$(VBOX_PATH_MESA_SOURCE)/src/mesa/glapi \
$(VBOX_PATH_MESA_SOURCE)/src/mesa/main \
$(VBOX_PATH_MESA_SOURCE)/src/mesa/drivers/dri/common
VBOX_DARWIN_OPENGL_INST = obj/VBoxOGL/GL/
SDK_DARWIN-OPENGL_INCS = $(PATH_OUT)/obj/VBoxOGL
SDK_DARWIN-OPENGL_ORDERDEPS = $(addprefix $(PATH_OUT)/obj/VBoxOGL/GL/,$(VBOX_DARWIN_OPENGL_HEADERS))
VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
VBOX_WINDOWS_ADDITIONS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
VBOX_NSIS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_win.ico
VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox.icns
VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-vista.ico
VBOX_WINDOWS_ADDITIONS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBoxGA-vista.ico
VBOX_NSIS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBoxGA-nsis.ico
VBOX_WINDOWS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-winxp.ico
VBOX_WINDOWS_ADDITIONS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBoxGA-winxp.ico
VBOX_NSIS_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox-nsis.ico
VBOX_MACOSX_ICON_FILE ?= $(PATH_ROOT)/src/VBox/Artwork/VirtualBox.icns
# These tests never worked on Windows because of /dev/null, so, there
if $(1) $(subst -Wno-,-W,$(2)) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; )
if $(1) $(subst -Wno-,-W,$(2)) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; )
if $(1) -Wl,$(2) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) \
$(1) -dumpversion | $(SED_EXT) 's|\([0-9]\)\.\([0-9]\)\.\{0,1\}\([0-9]\{0,1\}\).*|$$(int-add $$(int-mul 10000, \1), $$(int-mul 100, \2), $$(firstword \3 0))|' )
# them for supported options in the Dynamic Config.kmk section below.
VBOX_PATH_PREFIX_MINGW32 := $(substr $(VBOX_PATH_PREFIX_MINGW32), 1, $(expr $(length-var VBOX_PATH_PREFIX_MINGW32) - 3))
VBOX_PATH_PREFIX_MINGW64 := $(substr $(VBOX_PATH_PREFIX_MINGW64), 1, $(expr $(length-var VBOX_PATH_PREFIX_MINGW64) - 3))
include $(KBUILD_PATH)/tools/YASM.kmk
VBOX_YASM_CHECK = $(if-expr "$(shell $(TOOL_YASM_AS) -e -o nul $1 - < /dev/null 2>&1)" == "",$(1),)
VBOX_YASM_CHECK = $(if-expr "$(shell $(TOOL_YASM_AS) -e -o /dev/null $1 - < /dev/null 2>&1)" == "",$(1),)
$(PATH_OUT)/DynamicConfig.kmk: \
$(PATH_ROOT)/Config.kmk \
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CC))'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC_TOOL)_CXX))'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_LIBGCC ?= $(shell $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-libgcc-file-name)'
# -Wextra produces additional useful warnings but includes -Wno-missing-field-initializers (too noisy)
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-delete-non-virtual-dtor ?= $(call VBOX_GCC_CHECK_CXX,-Wno-delete-non-virtual-dtor,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-int-to-pointer-cast ?= $(call VBOX_GCC_CHECK_CC,-Wno-int-to-pointer-cast,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-invalid-offsetof ?= $(call VBOX_GCC_CHECK_CXX,-Wno-invalid-offsetof,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-missing-field-initializers ?= $(call VBOX_GCC_CHECK_CC,-Wno-missing-field-initializers,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-pointer-to-int-cast ?= $(call VBOX_GCC_CHECK_CC,-Wno-pointer-to-int-cast,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_Wno-variadic-macros ?= $(call VBOX_GCC_CHECK_CXX,-Wno-variadic-macros,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-stack-protector ?= $(call VBOX_GCC_CHECK_CC,-fno-stack-protector,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fno-dwarf2-cfi-asm ?= $(call VBOX_GCC_CHECK_CC,-fno-dwarf2-cfi-asm,)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC_fdiagnostics-show-option ?= $(call VBOX_GCC_CHECK_CC,-fdiagnostics-show-option,)'
# Produce code optimized for the most common IA32/AMD64/EM64T processors. Introduced with gcc version 4.2.
# See http://osdir.com/ml/gcc.prs/2002-08/msg00223.html and probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20004
$(QUIET)$(APPEND) '$@' ' VBOX_GCC_fvisibility-hidden ?= $(call VBOX_GCC_CHECK_CC,-fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT,)'
$(QUIET)$(APPEND) '$@' ' VBOX_GCC_fvisibility-inlines-hidden ?= $(call VBOX_GCC_CHECK_CXX,-fvisibility-inlines-hidden,)'
# Detect the solaris assembler. It is used by the the 4.x gcc compilers,
$(QUIET)$(APPEND) '$@' 'VBOX_AS_VERSION ?= $(shell `gcc -print-prog-name=as` -V -o /dev/null < /dev/null 2>&1 | kmk_sed -e '1!d' -e 's/^as: *//' )'
# Note that `$(dir $(gcc -print-libgcc-file-name))/include does not work for a 64-bit cross build on a 32-bit build host.
$(QUIET)$(APPEND) '$@' 'VBOX_PATH_GCC_INCS ?= $(shell LC_ALL=C $(TOOL_$(VBOX_GCC_TOOL)_CC) -print-search-dirs|$(SED_EXT) -ne 's+^install: \(.*[^/][^/]*\)/+\1+p')/include'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC32_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CC))'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC32_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(TOOL_$(VBOX_GCC32_TOOL)_CXX))'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC32_LIBGCC ?= $(shell $(TOOL_$(VBOX_GCC32_TOOL)_CC) -print-libgcc-file-name)'
$(QUIET)$(APPEND) '$@' 'VBOX_GCC32_Wno-variadic-macros ?= $(call VBOX_GCC32_CHECK_CXX,-Wno-variadic-macros,)'
$(QUIET)$(APPEND) '$@' 'VBOX_LD_no_compact_linkedit ?= $(call VBOX_GCC_CHECK_LD,-no_compact_linkedit,)'
$(QUIET)$(APPEND) '$@' 'VBOX_YASM_Wno-segreg-in-64bit ?= $(call VBOX_YASM_CHECK,-Wno-segreg-in-64bit,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW32_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(VBOX_PATH_PREFIX_MINGW32)gcc -m32)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW32_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(VBOX_PATH_PREFIX_MINGW32)g++ -m32)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW32_Wno-array-bounds ?= $(call VBOX_GCC_CHECK_EX_CXX,$(VBOX_PATH_PREFIX_MINGW32)g++ -m32,-Wno-array-bounds,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW32_Wno-unused-but-set-variable ?= $(call VBOX_GCC_CHECK_EX_CXX,$(VBOX_PATH_PREFIX_MINGW32)g++ -m32,-Wno-unused-but-set-variable,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW32_Wno-maybe-uninitialized ?= $(call VBOX_GCC_CHECK_EX_CXX,$(VBOX_PATH_PREFIX_MINGW32)g++ -m32,-Wno-maybe-uninitialized,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW32_USER_LABEL_PREFIX ?= $(shell echo "__USER_LABEL_PREFIX__" | $(VBOX_PATH_PREFIX_MINGW32)g++ -m32 -E -xc++ - | $(SED) -e "/^$(HASH)/d")'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW64_VERSION_CC ?= $(call VBOX_GCC_VERSION,$(VBOX_PATH_PREFIX_MINGW64)gcc -m64)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW64_VERSION_CXX ?= $(call VBOX_GCC_VERSION,$(VBOX_PATH_PREFIX_MINGW64)g++ -m64)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW64_Wno-array-bounds ?= $(call VBOX_GCC_CHECK_EX_CXX,$(VBOX_PATH_PREFIX_MINGW64)g++ -m64,-Wno-array-bounds,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW64_Wno-unused-but-set-variable ?= $(call VBOX_GCC_CHECK_EX_CXX,$(VBOX_PATH_PREFIX_MINGW64)g++ -m64,-Wno-unused-but-set-variable,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW64_Wno-maybe-uninitialized ?= $(call VBOX_GCC_CHECK_EX_CXX,$(VBOX_PATH_PREFIX_MINGW64)g++ -m64,-Wno-maybe-uninitialized,)'
$(QUIET)$(APPEND) '$@' 'VBOX_MINGW64_USER_LABEL_PREFIX ?= $(shell echo "__USER_LABEL_PREFIX__" | $(VBOX_PATH_PREFIX_MINGW64)g++ -m64 -E -xc++ - | $(SED) -e "/^$(HASH)/d")'
include $(PATH_OUT)/DynamicConfig.kmk
$(1)_SOURCES = $$($(1)_0_OUTDIR)/$(1)Imp.def
$(1)_CLEAN = $$($(1)_0_OUTDIR)/$(1)Imp.def
$(1)_SOURCES = $$($(1)_0_OUTDIR)/$(1)Imp.c
$(1)_CLEAN = $$($(1)_0_OUTDIR)/$(1)Imp.c
$$$$($(1)_SOURCES): $(addprefix $(PATH_SUB_CURRENT)/,$(3)) $(PATH_ROOT)/src/bldprogs/deftoimp.sed | $$$$(dir $$$$@)
-e 's/^LIBRARY[[:space:]][[:space:]]*\(.*\)\.dll/LIBRARY \1 INITINSTANCE TERMINSTANCE\nDATA MULTIPLE\n/' \
-f $(PATH_ROOT)/src/bldprogs/deftoimp.sed \
# VBOX_PATH_SELFSIGN points to the Vista WDK bin/SelfSign directory.
VBOX_PATH_SELFSIGN := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS)/win.x86/selfsign/*)))
VBOX_PATH_SELFSIGN := $(PATH_DEVTOOLS)/win.x86/selfsign/r1
VBOX_INF2CAT ?= $(VBOX_PATH_SELFSIGN)/Inf2Cat.exe
VBOX_CROSS_CERTIFICATE_FILE ?= $(VBOX_PATH_SELFSIGN)/MSCV-VSClass3.cer
VBOX_TSA_URL ?= http://timestamp.verisign.com/scripts/timestamp.dll
VBOX_CERTIFICATE_SUBJECT_NAME ?= $(error You, need to set VBOX_CERTIFICATE_SUBJECT_NAME in LocalConfig.kmk.)
-e 's/^;edit-DriverVer.*/DriverVer = $(date-utc %m\/%d\/%Y),$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)/' \
-e 's/^;edit-DriverVer.*/DriverVer = $(date-utc %m\/%d\/%Y),$(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD)/' \
-long "$(VBOX_PRODUCT) $(VBOX_VERSION_STRING) $(shell /bin/echo -e '\xC2\xA9')2009-$(VBOX_C_YEAR) $(VBOX_VENDOR)"
VBOX_HAIKU_XRES_SETVER_CMDS ?= $(if $(eq $(tool_do),LINK_PROGRAM),$(call VBOX_HAIKU_XRES_SETVER_FN,$(out),$($(target)_RSRCS),$(target)),)
SDK_VBOX_LIBXML2_INCS ?= $(PATH_ROOT)/src/libs/libxml2-2.6.31/include
SDK_VBOX_LIBXML2_DEFS.win += WIN32 _WINDOWS _MBCS
# note: no linking to LIB here, we do that explicitly in src/VBox/Runtime/Makefile.kmk to link
SDK_VBOX_LIBPNG_INCS ?= $(PATH_ROOT)/src/libs/libpng-1.2.8
SDK_VBOX_ZLIB_INCS ?= $(PATH_ROOT)/src/libs/zlib-1.2.6
SDK_VBOX_ZLIB_DEFS.linux ?= _LARGEFILE64_SOURCE
SDK_VBOX_OPENSSL = Only for VBoxRT and/or statically linked programs.
SDK_VBOX_OPENSSL_VBOX_DEFAULT_INCS := $(PATH_OUT)/obj/crypto-headers/include
SDK_VBOX_OPENSSL-x86 = Only for VBoxRT and/or statically linked programs.
SDK_VBOX_OPENSSL-x86_VBOX_DEFAULT_INCS := $(PATH_OUT)/obj/crypto-headers/include
SDK_VBOX_LIBCURL_INCS ?= $(PATH_ROOT)/src/libs/curl-7.27.0/include
SDK_VBOX_LIBCURL-x86_INCS ?= $(PATH_ROOT)/src/libs/curl-7.27.0/include
SDK_VBOX_LIBCURL-x86_LIBS.x86 ?= $(PATH_STAGE_LIB)/VBox-libcurl-x86$(VBOX_SUFF_LIB)
SDK_VBOX_VPX_DEFAULT_INCS := $(PATH_ROOT)/src/libs/libvpx
# Special SDK for the problematic NTDLL.LIB.
ifneq ($(wildcard /lib/modules/$(shell uname -r)/build/include/linux/autoconf.h /lib/modules/$(shell uname -r)/build/include/generated/autoconf.h),)
export VBOX_LINUX_SRC := /lib/modules/$(shell uname -r)/build
export VBOX_LINUX_SRC := /usr/src/linux
kernelpath := $(shell $(SED_EXT) -ne 's+^MAKEARGS *:= *-C *\(\S*\).*+\1+p' $(VBOX_LINUX_SRC)/Makefile)
VBOX_LINUX_INCS += $(kernelpath)/include/asm-i386/mach-default \
$(kernelpath)/include/asm-x86/mach-default \
$(kernelpath)/include/drm \
$(kernelpath)/arch/x86/include \
$(kernelpath)/arch/x86/include/asm/mach-default \
$(kernelpath)/arch/x86/include/uapi \
$(VBOX_LINUX_SRC)/arch/x86/include/generated \
$(VBOX_LINUX_SRC)/arch/x86/include/generated/uapi \
$(kernelpath)/include/uapi \
$(VBOX_LINUX_SRC)/include/generated/uapi \
# Since Linux 2.6.15, <linux/autoconf.h> is included like this. It cannot hurt to do the
ifneq ($(wildcard $(kernelpath)/include/linux/kconfig.h),)
export VBOX_LINUX_INCLUDE := -include $(kernelpath)/include/linux/kconfig.h
else ifneq ($(wildcard $(VBOX_LINUX_SRC)/include/generated/autoconf.h),)
export VBOX_LINUX_INCLUDE := -include $(VBOX_LINUX_SRC)/include/generated/autoconf.h
else ifneq ($(wildcard $(VBOX_LINUX_SRC)/include/linux/autoconf.h),)
export VBOX_LINUX_INCLUDE := -include $(VBOX_LINUX_SRC)/include/linux/autoconf.h
$(eval export VBOX_SOLARIS_VERSION := $(shell uname -r | $(SED_EXT) 's|\([0-9]*\)\.\([0-9]*\)|$$(int-add $$(int-mul 100, \1), \2)|' ))
DEFS.solaris += RT_OS_SOLARIS_10
# uname -v can report "snv_XYZ" or "11.X"
VBOX_SOLARIS_11_VERSION = $(shell uname -v | sed 's/snv_//' | cut -f1 -d'.')
VBOX_SOLARIS_11_FULLVERSION = $(shell pkg contents -H -t set -o pkg.fmri system/kernel | $(SED_EXT) -e '1!d' -e 's/^.*\@//;s/\:.*//;s/.*,//')
# FULLVERSION format e.g. "5.11-0.175.1.0.0.16.0", we're interested in 175 (VERSION), 1 (UPDATE), 16 (BUILD).
VBOX_SOLARIS_11_VERSION = $(word 2, $(subst ., ,$(word 2,$(subst -, ,$(VBOX_SOLARIS_11_FULLVERSION)))))
VBOX_SOLARIS_11_UPDATE_VERSION = $(word 3, $(subst ., ,$(word 2,$(subst -, ,$(VBOX_SOLARIS_11_FULLVERSION)))))
VBOX_SOLARIS_11_BUILD_VERSION = $(word 6, $(subst ., ,$(word 2,$(subst -, ,$(VBOX_SOLARIS_11_FULLVERSION)))))
TOOL_DTraceAndVBoxTpG = DTrace and the VirtualBox Tracepoint Generator working together on static ring-3 probes.
$(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \
TEMPLATE_VBoxRc_INCS = $(PATH_ROOT)/include/iprt/nocrt
TEMPLATE_VBoxRc_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) -W4 -wd4244 -wd4996 -wd4127 -wd4100 -wd4214 -wd4706 $(VBOX_VCC_WERR)
TEMPLATE_VBoxRc_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- -Gs8192 $(VBOX_VCC_GC_OPT) $(VBOX_VCC_GC_FP) -W3 -wd4244 -wd4996 $(VBOX_VCC_WERR)
-Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug \
-Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti
TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden)
TEMPLATE_VBoxRc_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-rtti
TEMPLATE_VBoxRc_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -m32 -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-common -msoft-float -static $(VBOX_GCC_fno-stack-protector) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing
#TEMPLATE_VBoxRc_LDFLAGS.release = -Wl,-S ???
TEMPLATE_VBoxRc_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti
TEMPLATE_VBoxRc_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -fno-strict-aliasing -fno-exceptions
-Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
$(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/libcmt.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/oldnames.lib
if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd.amd64)
TEMPLATE_VBoxRcExe_DEFS.$(KBUILD_TARGET) = $(TEMPLATE_VBoxRc_DEFS.$(KBUILD_TARGET)) IPRT_DONT_USE_SYSTEM_STDINT_H
TEMPLATE_VBoxRcExe_LDFLAGS.$(KBUILD_TARGET) = /usr/lib32/crt1.o /usr/lib32/crti.o /usr/lib32/crtbegin.o $(TEMPLATE_VBoxRc_LDFLAGS.$(KBUILD_TARGET)) -nostdlib -v
TEMPLATE_VBoxRcExe_LIBPATH.$(KBUILD_TARGET) = /usr/lib32
TEMPLATE_VBoxR0_DEFS = IN_RING0 IN_RING0_AGNOSTIC IPRT_NO_CRT RT_WITH_NOCRT_ALIASES $(ARCH_BITS_DEFS)
TEMPLATE_VBoxR0_INCS = $(PATH_ROOT)/include/iprt/nocrt
TEMPLATE_VBoxR0_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -W4 -wd4244 -wd4127 -wd4100 -wd4214 -wd4706 -wd4996 $(VBOX_VCC_WERR)
TEMPLATE_VBoxR0_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -GS- -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -W3 -wd4244 -wd4996 $(VBOX_VCC_WERR)
-Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug \
-Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
TEMPLATE_VBoxR0_LDFLAGS += -Merge:VTGPrLc.Data=VTGPrLc.Begin -Merge:VTGPrLc.End=VTGPrLc.Begin -Merge:VTGPrLc.Begin=VTGObj
TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99
TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti
TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding
TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables
TEMPLATE_VBoxR0_LDFLAGS.solaris = -u _init -u _info
TEMPLATE_VBoxR0_CFLAGS.amd64 += -Wa,-xmodel=kernel
TEMPLATE_VBoxR0_CXXFLAGS.amd64 += -Wa,-xmodel=kernel
TEMPLATE_VBoxR0_CXXFLAGS = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) \
-fno-common -msoft-float -static -fno-rtti -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
TEMPLATE_VBoxR0_CXXFLAGS.x86 = -m32
TEMPLATE_VBoxR0_CFLAGS = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \
-fno-common -msoft-float -static -fno-exceptions $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing \
TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse3 -mno-sse4 -mno-sse4.1 -mno-sse4.2 -mno-sse4a -fno-unwind-tables
TEMPLATE_VBoxR0_CFLAGS.x86 = -m32
#TEMPLATE_VBoxR0_LDFLAGS.release = -Wl,-S ???
TEMPLATE_VBoxR0_LDFLAGS.amd64 = -m64 -static
TEMPLATE_VBoxR0_LDFLAGS.x86 = -m32
TEMPLATE_VBoxR0_CFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-common
TEMPLATE_VBoxR0_CXXFLAGS = -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-common -fno-rtti
TEMPLATE_VBOXR0DRV_DEFS.x86 = _X86_
TEMPLATE_VBOXR0DRV_DEFS.x86 += WIN9X_COMPAT_SPINLOCK # Avoid multiply defined _KeInitializeSpinLock@4
TEMPLATE_VBOXR0DRV_DEFS.amd64 = _AMD64_
TEMPLATE_VBOXR0DRV_CXXFLAGS = -Zi -Zl -GR- -EHs- -GF -Gz -W3 -GS- -wd4996 -Zc:wchar_t- -Gs4096 $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
-Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
TEMPLATE_VBOXR0DRV_LDFLAGS += -Merge:VTGPrLc.Data=VTGPrLc.Begin -Merge:VTGPrLc.End=VTGPrLc.Begin -Merge:VTGPrLc.Begin=VTGObj
$(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare $(VBOX_GCC_fdiagnostics-show-option) \
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mpreferred-stack-boundary=2 -msoft-float
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
TEMPLATE_VBOXR0DRV_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wno-pointer-sign -ffreestanding -Wdeclaration-after-statement -Werror-implicit-function-declaration,$(TEMPLATE_VBOXR0DRV_CFLAGS) $(TEMPLATE_VBOXR0DRV_CFLAGS.$(KBUILD_TARGET_ARCH))) -fno-exceptions -fno-rtti
TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m elf_i386 -r
TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m elf_x86_64 -r
TEMPLATE_VBOXR0DRV_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions -fno-rtti
TEMPLATE_VBOXR0DRV_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions
TEMPLATE_VBOXR0DRV_DEFS += $(VBOX_DARWIN_DEF_SDK_DEFS) KERNEL KERNEL_PRIVATE DRIVER_PRIVATE APPLE NeXT
TEMPLATE_VBOXR0DRV_INCS += $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/Kernel.framework/Headers
-fno-common -nostdinc -fno-builtin -finline $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) \
TEMPLATE_VBOXR0DRV_CXXFLAGS.amd64 = -m64 -mkernel -mno-red-zone -gdwarf-2
TEMPLATE_VBOXR0DRV_CXXFLAGS.x86 = -m32 -static
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mkernel -mno-red-zone -gdwarf-2
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -static
TEMPLATE_VBOXR0DRV_LDFLAGS = $(filter-out $(VBOX_DARWIN_NO_COMPACT_LINKEDIT),$(VBOX_DARWIN_DEF_SDK_LDFLAGS)) \
TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = $(if $(eq $(KBUILD_HOST),solaris),-64,-m elf_x86_64)
-Wformat -Wimplicit-int -Wimplicit-function-declaration -Werror-implicit-function-declaration -Wparentheses \
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow $(VBOX_GCC_msave-args) \
-mno-red-zone -mcmodel=kernel $(if-expr defined(VBOX_GCC_USING_SOLARIS_AS),-Wa$(COMMA)-xmodel=kernel,) \
-O2 -nodefaultlibs -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -fno-exceptions -fno-rtti
# -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions \
# -std=c99 -c ../my.c
# awk -f /usr/src/sys/modules/my/../../conf/kmod_syms.awk my.kld export_syms | xargs -J% objcopy % my.kld
# cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq \
# -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common \
# -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign \
# awk -f /usr/src/sys/modules/my/../../conf/kmod_syms.awk if_my.ko export_syms | xargs -J% objcopy % if_my.ko
VBOX_FREEBSD_SRC ?= /usr/src/sys
## The FreeBSD /usr/include.
VBOX_FREEBSD_SYS_INCS ?= /usr/include
$(VBOX_FREEBSD_SRC)/contrib/altq \
$(VBOX_GCC_WARN) -Wpointer-arith -Winline $(VBOX_GCC_Wno-pointer-sign) $(VBOX_GCC_fdiagnostics-show-option) \
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \
TEMPLATE_VBOXR0DRV_LDFLAGS.x86 = -m elf_i386_fbsd
TEMPLATE_VBOXR0DRV_LDFLAGS.amd64 = -m elf_x86_64_fbsd
# See kBuild/tools/GCC3.kmk for docs.
TOOL_FREEBSDKMODLD_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(basename $(lib))), $(lib)))
awk -f $(VBOX_FREEBSD_SRC)/conf/kmod_syms.awk $(outbase).kld $(if $(othersrc), $(othersrc),/dev/null) \
TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lroot -rpath-link /boot/system/develop/lib/x86 --no-add-needed /boot/system/develop/lib/_KERNEL_ --no-add-needed /boot/system/develop/lib/haiku_version_glue.o
$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow \
-O2 -nodefaultlibs -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -fno-exceptions -fno-rtti
# This doesn't work if supdrv is natively loading VMMR0.r0 et al, but
TEMPLATE_VBOXR0DRV_CFLAGS += -include $(PATH_ROOT)/include/VBox/SUPDrvMangling.h
TEMPLATE_VBOXR0DRV_CXXFLAGS += -include $(PATH_ROOT)/include/VBox/SUPDrvMangling.h
TEMPLATE_VBOXR3EXE_ASFLAGS.x86 = $(VBOX_ASFLAGS32)
TEMPLATE_VBOXR3EXE_ASFLAGS.amd64 = $(VBOX_ASFLAGS64)
TEMPLATE_VBOXR3EXE_DEFS.win = _CRT_SECURE_NO_DEPRECATE
TEMPLATE_VBOXR3EXE_DTRACE_OBJ_FLAGS = --ring-3-context --pic --probe-fn-imported --probe-fn-name "SUPTracerFireProbe"
TEMPLATE_VBOXR3EXE_LIBS.kprofile = $(LIB_KPROFILE)
TEMPLATE_VBOXR3EXE_TOOL.win.x86 = $(VBOX_VCC_TOOL_STEM)X86
TEMPLATE_VBOXR3EXE_TOOL.win.amd64 = $(VBOX_VCC_TOOL_STEM)AMD64
TEMPLATE_VBOXR3EXE_CXXFLAGS = -Zi -Zl -GR- -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
TEMPLATE_VBOXR3EXE_CXXFLAGS.debug = -RTCsu
TEMPLATE_VBOXR3EXE_CXXFLAGS.dbgopt = $(NO_SUCH_VARIABLE)
TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -Gh -GH
/STUB:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com \
/DISALLOWLIB:libc.lib \
/DISALLOWLIB:libcd.lib \
/DISALLOWLIB:libcmt.lib \
/DISALLOWLIB:libcmtd.lib \
TEMPLATE_VBOXR3EXE_LDFLAGS += -Merge:VTGPrLc.Data=VTGPrLc.Begin -Merge:VTGPrLc.End=VTGPrLc.Begin -Merge:VTGPrLc.Begin=VTGObj
$(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.x86)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.x86)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.amd64)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXR3EXE_TOOL.win.amd64)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib \
TEMPLATE_VBOXR3EXE_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden)
TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = -finstrument-functions
TEMPLATE_VBOXR3EXE_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing $(VBOX_GCC_fvisibility-hidden)
TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack $(VBOX_LD_as_needed)
TEMPLATE_VBOXR3EXE_LDFLAGS.solaris = -Wl,-z,ignore # same as VBOX_LD_as_needed
TEMPLATE_VBOXR3EXE_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS)
TEMPLATE_VBOXR3EXE_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common
TEMPLATE_VBOXR3EXE_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
TEMPLATE_VBOXR3EXE_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
TEMPLATE_VBOXR3EXE_OBJCXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCXXFLAGS)
TEMPLATE_VBOXR3EXE_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
TEMPLATE_VBOXR3EXE_LDFLAGS.darwin.x86 = -read_only_relocs suppress
TEMPLATE_VBOXR3EXE_CXXFLAGS := $(filter-out -pedantic,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -fdollars-in-identifiers # annoying gcc option precedence.
/usr/lib \
TEMPLATE_VBOXR3EXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT)
TEMPLATE_VBOXR3 = VBox Ring 3 SO/DLLs
TEMPLATE_VBoxR3Dll += VBox ring-3 SO/DLLs, no warnings
TEMPLATE_VBoxR3Dll-x86 = 32-bit VBox ring-3 SO/DLLs, no warnings
TEMPLATE_VBoxR3DllNoPic = VBox ring-3 SO/DLLs without PIC, without warnings.
TEMPLATE_VBoxR3DllNoPic_CXXFLAGS.debug = $(filter-out -RTC%,$(TEMPLATE_VBOXR3_CXXFLAGS.debug)) # RTCsu Prevents IEM opt.
TEMPLATE_VBoxR3DllNoPic-x86 = 32-bit VBox ring-3 SO/DLLs without PIC, without warnings.
TEMPLATE_VBoxR3DllWarnNoPic = VBox ring-3 SO/DLLs without PIC, with warnings.
TEMPLATE_VBOXR3STATIC_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
TEMPLATE_VBOXR3STATIC_LDFLAGS = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
/DISALLOWLIB:msvcrt.lib \
/DISALLOWLIB:msvcrtd.lib \
/DISALLOWLIB:msvcprt.lib \
/DISALLOWLIB:msvcprtd.lib
$(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.x86)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib
$(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib \
# The gcc guys sans darwin, linux and solaris (don't depend on statically compiled system libs there)
TEMPLATE_VBOXR3STATIC_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)',$(TEMPLATE_VBOXR3EXE_LDFLAGS))
TEMPLATE_VBOXR3STATIC_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)',$(TEMPLATE_VBOXR3EXE_LDFLAGS))
TEMPLATE_VBoxR3Static_SDKS.win += VBOX_NTDLL
TEMPLATE_VBOXR3DLLNOXCPT = VBox Ring 3 SO/DLLs without C++ exception
TEMPLATE_VBOXR3HARDENEDEXE_DEBUG_INST.win = $(INST_DEBUG)hardened-exes/
# not necessary except USE_LIB_PCAP is defined in SUPR3HardenedMain.cpp
TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -GS-
TEMPLATE_VBOXR3HARDENEDEXE_CXXFLAGS.debug= $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CXXFLAGS.debug)) -GS- -O2 -Oy-
TEMPLATE_VBOXR3HARDENEDEXE_CFLAGS.debug = $(filter-out -RTC% -GZ -GS,$(TEMPLATE_VBOXR3EXE_CFLAGS.debug)) -GS- -O2 -Oy-
TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_LDFLAGS.win.x86) /entry:suplibHardenedWindowsMain
TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.win.amd64 = $(TEMPLATE_VBOXR3EXE_LDFLAGS.win.amd64) /entry:suplibHardenedWindowsMain
TEMPLATE_VBOXR3HARDENEDEXE_LIBS.x86 = $(NOT_SUCH_VARIABLE)
TEMPLATE_VBOXR3HARDENEDEXE_LIBS.amd64 = $(NOT_SUCH_VARIABLE)
TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT)
TEMPLATE_VBoxR3Tool_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
TEMPLATE_VBoxR3Tool_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
TEMPLATE_VBOXR3OSX105 = VBox Ring 3 SO/DLLs for OS X 10.5
TEMPLATE_VBOXR3OSX105_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_DEFS) PIC
TEMPLATE_VBOXR3OSX105_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CFLAGS) -fno-common
TEMPLATE_VBOXR3OSX105_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS)
TEMPLATE_VBOXR3OSX105_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS)
TEMPLATE_VBOXR3OSX105_OBJCXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS)
TEMPLATE_VBOXR3OSX105_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS) \
TEMPLATE_VBOXR3TSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
TEMPLATE_VBOXR3TSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBOXR3EXE_LDFLAGS)
TEMPLATE_VBOXR3TSTNPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3TSTEXE_CXXFLAGS)) -Wno-sign-compare
TEMPLATE_VBOXR3TSTNPEXE_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3TSTEXE_CFLAGS)) -Wno-sign-compare
TEMPLATE_VBOXR3NPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3EXE_CXXFLAGS)) -Wno-sign-compare
TEMPLATE_VBOXR3NPEXE_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3EXE_CFLAGS)) \
TEMPLATE_VBOXR3NP_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3_CXXFLAGS)) -Wno-sign-compare
TEMPLATE_VBOXR3NP_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3_CFLAGS)) \
TEMPLATE_VBoxR3DllNonPedantic_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXR3_CXXFLAGS)) -Wno-sign-compare
TEMPLATE_VBoxR3DllNonPedantic_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXR3_CFLAGS)) \
TEMPLATE_VBoxR3DllNonPedantic-x86 = 32-bit VBox ring-3 SO/DLLs, no warnings
TEMPLATE_VBoxNoCrtGccLib = VBox no-crt GCC libraries and modules, yasm/nasm.
TEMPLATE_VBoxNoCrtGccLib_CFLAGS = -nostdinc -fno-strict-aliasing -fno-math-errno $(VBOX_GCC_WARN) -Werror-implicit-function-declaration
TEMPLATE_VBoxNoCrtGccLib_CFLAGS.amd64 = -m64 -mcmodel=medium -fno-common
TEMPLATE_VBoxNoCrtGccLib_CFLAGS.release = -O2 -fno-strict-aliasing
TEMPLATE_VBoxNoCrtGccLib_CFLAGS.darwin = -static
TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS.$(KBUILD_TARGET) = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS.$(KBUILD_TARGET))
TEMPLATE_VBoxNoCrtGccLib_CXXFLAGS.$(KBUILD_TARGET_ARCH) = $(TEMPLATE_VBoxNoCrtGccLib_CFLAGS.$(KBUILD_TARGET_ARCH))
TEMPLATE_VBoxNoCrtGccLib_INCS = $(PATH_ROOT)/include/iprt/nocrt
ifeq (disabled-by-mingw-w64 $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
TEMPLATE_VBoxNoCrtGccLib_LIBS = $(PATH_DEVTOOLS)/win.x86/x86_64-unknown-linux-gnu/20060701-r2/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/libgcc.a
# The use of --exclude-libs ALL is to avoid confusing the linux ld.so.
TEMPLATE_VBoxNoCrtGccLib_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
# Same as VBoxNoCrtGccLib only it uses GAS as the assembler instead of yasm/nasm.
ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
# (COM/XPCOM interface to VirtualBox).
TEMPLATE_VBOXMAINEXE_DEFS.win = _UNICODE
TEMPLATE_VBOXMAINEXE_LIBS.kprofile = $(LIB_KPROFILE)
TEMPLATE_VBOXMAINEXE_TOOL.win.x86 = $(VBOX_VCC_TOOL_STEM)X86
TEMPLATE_VBOXMAINEXE_TOOL.win.amd64 = $(VBOX_VCC_TOOL_STEM)AMD64
TEMPLATE_VBOXMAINEXE_CXXFLAGS = -Zi -Zl -GR -EHsc -GF -MD$(VBOX_VCC_CRT_TYPE) -W3 -wd4065 -wd4996 -wd4250 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP)
TEMPLATE_VBOXMAINEXE_CXXFLAGS.debug = -RTCsu
TEMPLATE_VBOXMAINEXE_CXXFLAGS.dbgopt = $(NO_SUCH_VARIABLE)
TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -Gh -GH
/STUB:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com \
/DISALLOWLIB:libc.lib \
/DISALLOWLIB:libcd.lib \
/DISALLOWLIB:libcmt.lib \
/DISALLOWLIB:libcmtd.lib \
$(PATH_TOOL_$(TEMPLATE_VBOXMAINEXE_TOOL.win.x86)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXMAINEXE_TOOL.win.x86)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXMAINEXE_TOOL.win.x86)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib
$(PATH_TOOL_$(TEMPLATE_VBOXMAINEXE_TOOL.win.amd64)_LIB)/msvcrt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXMAINEXE_TOOL.win.amd64)_LIB)/msvcprt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXMAINEXE_TOOL.win.amd64)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib
$(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) -Wno-long-long -Wno-non-virtual-dtor -Wshadow \
-fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \
TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile = -finstrument-functions
TEMPLATE_VBOXMAINEXE_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) \
TEMPLATE_VBOXMAINEXE_LDFLAGS.linux = -Wl,-z,noexecstack $(VBOX_LD_as_needed)
TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin += -bind_at_load
/usr/lib \
TEMPLATE_VBOXMAINEXE_LDFLAGS.solaris = -Wl,-z,ignore # Same as VBOX_LD_as_needed.
TEMPLATE_VBOXMAINEXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT)
# Add COM/XPCOM stuff
$(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
$(VBOX_PATH_SDK)/bindings/mscom/include
$(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
# Template for building the Main DLL modules (such as in-process COM/XPCOM
TEMPLATE_VBOXMAINDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin)) \
TEMPLATE_VBOXMAINCOMP = VBox Main COM/XPCOM Component (shared library)
ifeq ($(filter-out solaris.x86 %.amd64 %.sparc32 %.sparc64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) ## TODO: cleanup!
TEMPLATE_VBOXMAINCOMP_LDFLAGS = -fPIC $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
TEMPLATE_VBOXMAINCOMP_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_VBOXMAINEXE_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
TEMPLATE_VBOXMAINCOMP_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINEXE_LDFLAGS.darwin)) \
TEMPLATE_VBoxMainComp-x86_DEFS = $(filter-out HC_ARCH_BITS%,$(TEMPLATE_VBOXMAINCOMP_DEFS)) HC_ARCH_BIT=32 ARCH_BITS=32 \
TEMPLATE_VBoxMainLib-x86_DEFS = $(filter-out HC_ARCH_BITS%,$(TEMPLATE_VBoxMainLib_DEFS)) HC_ARCH_BIT=32 ARCH_BITS=32 \
TEMPLATE_VBOXMAINTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBOXMAINEXE_LDFLAGS)
TEMPLATE_VBOXMAINTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBOXMAINEXE_LDFLAGS)
TEMPLATE_VBOXMAINCLIENTEXE_DEPS = $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/User32.Lib \
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Shell32.Lib \
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/ShLwApi.Lib \
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Ole32.Lib \
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/OleAut32.Lib \
$(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Uuid.Lib
TEMPLATE_VBOXMAINCLIENTEXE_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
TEMPLATE_VBOXMAINCLIENTDLL_LDFLAGS.darwin = $(filter-out -bind_at_load,$(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS.darwin))
TEMPLATE_VBOXMAINCLIENTTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS)
TEMPLATE_VBOXMAINCLIENTTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_VBOXMAINCLIENTEXE_LDFLAGS)
TEMPLATE_VBoxR3ExtPack_DEFS = $(TEMPLATE_VBoxNoCrtGccLib_DEFS) VBOX_IN_EXTPACK VBOX_IN_EXTPACK_R3 IPRT_NO_CRT IN_RING3
TEMPLATE_VBoxR3ExtPack_INCS = $(PATH_ROOT)/include/iprt/nocrt $(TEMPLATE_VBOXR3DLLNOXCPT_INCS)
TEMPLATE_VBoxR3ExtPack_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
TEMPLATE_VBoxR3ExtPack_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/../../..' $(filter-out '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)', $(TEMPLATE_VBOXR3DLLNOXCPT_LDFLAGS))
$(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_LIB), $(VBOX_LIB_VMM_LAZY)) \
$(if-expr "$(VBOX_LIB_VMM_LAZY)" == "$(LIB_VMM)", $(PATH_STAGE_LIB)/VMMR3Imp$(VBOX_SUFF_DLL), $(VBOX_LIB_VMM_LAZY)) \
VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)
VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks
VBOX_PATH_QT4 ?= $(lastword $(filter %-$(tolower $(VBOX_VCC_TOOL_STEM)),$(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))))
VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
VBOX_PATH_QT4_LIB ?= /usr/lib/qt4
TEMPLATE_VBOXQT4GUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT QT_SHARED HAVE_CONFIG_H $(ARCH_BITS_DEFS)
TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.dbgopt = $(NO_SUCH_VARIABLE)
/STUB:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcprt.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/msvcrt.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/oldnames.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls.lib
TEMPLATE_VBOXQT4GUIEXE_DEFS.linux = _REENTRANT
TEMPLATE_VBOXQT4GUIEXE_DEFS.solaris = _REENTRANT
-g $(VBOX_GCC_pipe) $(filter-out -Wno-unused,$(VBOX_GCC_WARN)) -frtti -fno-exceptions -Wno-non-virtual-dtor \
TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.linux = -pthread
TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) -Wno-long-long -fno-exceptions
TEMPLATE_VBOXQT4GUIEXE_DEFS.darwin += $(VBOX_DARWIN_DEF_SDK_DEFS)
TEMPLATE_VBOXQT4GUIEXE_CFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_CFLAGS)
TEMPLATE_VBOXQT4GUIEXE_CXXFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
TEMPLATE_VBOXQT4GUIEXE_OBJCFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS)
TEMPLATE_VBOXQT4GUIEXE_OBJCXXFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_OBJCXXFLAGS)
TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin += $(VBOX_DARWIN_DEF_SDK_LDFLAGS) -bind_at_load
/usr/lib \
TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.solaris = -Wl,-z,ignore # Same as VBOX_LD_as_needed.
# Add COM/XPCOM stuff
$(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
$(VBOX_PATH_SDK)/bindings/mscom/include
$(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
TEMPLATE_VBOXQT4GUI_LDFLAGS.darwin += $(filter-out -bind_at_load,$(TEMPLATE_VBOXQT4GUIEXE_LDFLAGS.darwin)) \
TEMPLATE_VBoxBldProg_DEFS.win := _CRT_SECURE_NO_DEPRECATE
TEMPLATE_VBoxBldProg_ASFLAGS.x86 := $(VBOX_ASFLAGS32)
TEMPLATE_VBoxBldProg_ASFLAGS.amd64 := $(VBOX_ASFLAGS64)
TEMPLATE_VBoxBldProg_CXXFLAGS := -Zi -Zl -GR- -EHsc -GF -W3 -wd4065 -wd4244 -wd4996 -Zc:wchar_t- $(VBOX_VCC_OPT) $(VBOX_VCC_FP) -MT$(VBOX_VCC_CRT_TYPE)
TEMPLATE_VBoxBldProg_CXXFLAGS.debug := -RTCsu
TEMPLATE_VBoxBldProg_CXXFLAGS.dbgopt = $(NO_SUCH_VARIABLE)
/DISALLOWLIB:msvcrt.lib \
/DISALLOWLIB:msvcrtd.lib \
/DISALLOWLIB:msvcprt.lib \
/DISALLOWLIB:msvcprtd.lib
$(PATH_TOOL_$(TEMPLATE_VBoxBldProg_TOOL)_LIB)/oldnames.lib \
TEMPLATE_VBoxBldProg_CFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros)
TEMPLATE_VBoxBldProg_CFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
TEMPLATE_VBoxBldProg_CXXFLAGS = -g $(VBOX_GCC_pipe) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros)
TEMPLATE_VBoxBldProg_CXXFLAGS.release = -O2 -fno-omit-frame-pointer -fno-strict-aliasing
TEMPLATE_VBoxBldProg_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_7_DEFS)
TEMPLATE_VBoxBldProg_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_7_CFLAGS) -fno-common
TEMPLATE_VBoxBldProg_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_7_CXXFLAGS)
TEMPLATE_VBoxBldProg_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_7_OBJCFLAGS) $(VBOX_GCC_PEDANTIC_C)
TEMPLATE_VBoxBldProg_OBJCXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_7_OBJCXXFLAGS) $(VBOX_GCC_PEDANTIC_CXX)
TEMPLATE_VBoxBldProg_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_7_LDFLAGS)
TEMPLATE_VBoxBldProg_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_DEFS)
TEMPLATE_VBoxBldProg_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_CFLAGS) -fno-common
TEMPLATE_VBoxBldProg_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS)
TEMPLATE_VBoxBldProg_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_OBJCFLAGS) $(VBOX_GCC_PEDANTIC_C)
TEMPLATE_VBoxBldProg_OBJCXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_OBJCXXFLAGS) $(VBOX_GCC_PEDANTIC_CXX)
TEMPLATE_VBoxBldProg_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS)
else if "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.5" || "$(VBOX_DARWIN_HOST_VERSION_MAJOR)" == "5" || defined(VBOX_MACOS_10_5_WORKAROUND)
TEMPLATE_VBoxBldProg_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_DEFS)
TEMPLATE_VBoxBldProg_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CFLAGS) -fno-common
TEMPLATE_VBoxBldProg_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_CXXFLAGS)
TEMPLATE_VBoxBldProg_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_OBJCFLAGS) $(VBOX_GCC_PEDANTIC_C)
TEMPLATE_VBoxBldProg_OBJCXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_OBJCXXFLAGS) $(VBOX_GCC_PEDANTIC_CXX)
TEMPLATE_VBoxBldProg_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS)
TEMPLATE_VBoxBldProg_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS)
TEMPLATE_VBoxBldProg_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common
TEMPLATE_VBoxBldProg_CXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
TEMPLATE_VBoxBldProg_OBJCFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCFLAGS) $(VBOX_GCC_PEDANTIC_C)
TEMPLATE_VBoxBldProg_OBJCXXFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_OBJCXXFLAGS) $(VBOX_GCC_PEDANTIC_CXX)
TEMPLATE_VBoxBldProg_LDFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_LDFLAGS)
/usr/lib \
# (Some (old) Wine versions fails loading msvcrt.dll from the VCC bin directory.)
TOOL_VCC80X86_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
TOOL_VCC80AMD64_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
TOOL_VCC70_RC := $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/rc.exe
WIN32_MC = $(EXEC_X86_WIN32) $(PATH_DEVTOOLS)/win.x86/bin/mc.exe
$(PATH_SDK_$(VBOX_WINPSDK)_BIN)/MC.Exe\
$(PATH_SDK_WINPSDK_BIN)/MC.Exe\
$(PATH_SDK_WINPSDK)/Bin/MC.Exe\
$(PATH_SDK_WIN32SDK_BIN)/MC.Exe\
$(PATH_SDK_WIN64SDK_BIN)/MC.Exe\
$(PATH_DEVTOOLS)/win.x86/bin/mc.exe\
TEMPLATE_VBOXGUESTR3EXE_CFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE)
TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
$(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL.win.x86)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL.win.x86)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib
$(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL.win.amd64)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \
$(PATH_TOOL_$(TEMPLATE_VBOXGUESTR3EXE_TOOL.win.amd64)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib
TEMPLATE_VBOXGUESTR3EXE_POST_CMDS.win.x86 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION) $(out)$$(NLTAB)$(TEMPLATE_VBOXR3EXE_POST_CMDS))
TEMPLATE_VBOXGUESTR3EXE_LNK_DEPS.win.x86 = $(if $(eq $(tool_do),LINK_LIBRARY),,$(VBOX_PE_SET_VERSION))
TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux))
TEMPLATE_VBOXGUESTR3EXE_TOOL.x86 := VBoxXGccX86RedHatLinux
TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS := $(filter-out $(VBOX_GCC_pipe) $(VBOX_GCC_Wextra) $(VBOX_GCC_Wno-missing-field-initializers) $(VBOX_GCC_fdiagnostics-show-option) $(VBOX_GCC_Wno-delete-non-virtual-dtor) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden),$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) -pipe
TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux := $(filter-out $(VBOX_GCC_ORIGIN_OPT) $(VBOX_LD_as_needed),$(TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux))
TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS))
TEMPLATE_VBOXGUESTR3EXE_DEFS := $(filter-out $(ARCH_BITS_DEFS), $(TEMPLATE_VBOXR3EXE_DEFS)) IN_GUEST IN_GUEST_R3 IN_RT_R3 $(VBOX_GC_ARCH_BITS_DEFS)
TEMPLATE_VBOXGUESTR3EXE_DEFS.linux := $(TEMPLATE_VBOXR3EXE_DEFS.linux) LOG_USE_C99 RT_WITHOUT_EXEC_ALLOC
TEMPLATE_VBOXGUESTR3NPEXE_CXXFLAGS = $(filter-out -pedantic -Wshadow,$(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS)) -Wno-sign-compare
TEMPLATE_VBOXGUESTR3NPEXE_CFLAGS = $(filter-out -pedantic -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations,$(TEMPLATE_VBOXGUESTR3EXE_CFLAGS)) -Wno-sign-compare
# Template for XFree86 guest modules (relocatable module, i.e. sysmod).
TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.x86 = -m elf_i386
TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.amd64 = -m elf_x86_64
TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-merge-constants -std=c99 -ffreestanding
TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-merge-constants -ffreestanding
TEMPLATE_VBOXGUESTR3XF86MOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) VBOX_GUESTR3XF86MOD RTMEM_NO_WRAP_TO_EF_APIS
# Template for X.org guest modules (shared libs).
TEMPLATE_VBOXGUESTR3XORGMOD = VBox X.org Guest Module
TEMPLATE_VBOXGUESTR3XORGMOD_DEFS = $(TEMPLATE_VBOXGUESTR3DLL_DEFS) VBOX_GUESTR3XORGMOD RTMEM_NO_WRAP_TO_EF_APIS
# Template for X.Org guest libraries.
TEMPLATE_VBOXGUESTR3XORGLIB = VBox X.Org Guest Library
TEMPLATE_VBOXGUESTR0_SDKS.win.x86 = ReorderCompilerIncs $(VBOX_WINDDK_GST) $(VBOX_WINPSDK_GST)INCS
TEMPLATE_VBOXGUESTR0_SDKS.win.amd64 = ReorderCompilerIncs $(VBOX_WINDDK_GST) $(VBOX_WINPSDK_GST)INCS
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/int64.lib
TEMPLATE_VBOXGUESTR0_DEFS.linux = RT_NO_EXPORT_SYMBOL
TEMPLATE_VBOXGUESTR0_CFLAGS = $(patsubst %/VBox/SUPDrvMangling.h,%/VBox/VBoxGuestMangling.h,$(TEMPLATE_VBOXR0DRV_CFLAGS))
TEMPLATE_VBOXGUESTR0_CXXFLAGS = $(patsubst %/VBox/SUPDrvMangling.h,%/VBox/VBoxGuestMangling.h,$(TEMPLATE_VBOXR0DRV_CXXFLAGS))
TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.win = _WIN32_WINNT=0x0500 WINDOWS=1
TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.linux = Linux=1 _GNU_SOURCE
TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE VBOX_WITH_COCOA_QT
TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin = -framework AppKit
TEMPLATE_VBOXCROGLR3HOSTDLL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
TEMPLATE_VBOXCROGLR3HOSTDLL_SDKS.darwin = DARWIN-OPENGL
TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.linux = -Wl,--no-as-needed
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.win = WINDOWS=1
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.linux = Linux=1 _GNU_SOURCE
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.solaris = SunOS=1 _GNU_SOURCE #GLEXT_64_TYPES_DEFINED
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY _GNU_SOURCE VBOX_WITH_COCOA_QT
TEMPLATE_VBOXCROGLR3GUESTDLL_LDFLAGS.darwin = -framework AppKit
TEMPLATE_VBOXCROGLR3GUESTDLL_DEFS.freebsd = FreeBSD=1 _GNU_SOURCE
TEMPLATE_VBOXCROGLR3GUESTDLL_SDKS.darwin = DARWIN-OPENGL
TEMPLATE_VBOXMESAR3GUESTLIB_DEFS.linux = Linux=1
TEMPLATE_VBOXMESAR3GUESTLIB_DEFS.solaris = SunOS=1
TEMPLATE_VBOXMESAR3GUESTLIB_DEFS.darwin = DARWIN=1 GL_GLEXT_LEGACY
VBOX_LIB_IPRT_GUEST_R3_SHARED_X86 = $(VBOX_PATH_ADDITIONS_LIB)/RuntimeGuestR3Shared-x86$(VBOX_SUFF_LIB)
VBOX_VERSION_COMP_VALID_CHAR_SET = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz()[]{}+-.,
$(error VBox: VBOX_BUILD_PUBLISHER='$(VBOX_BUILD_PUBLISHER)' contains bad characters! Valid set is:$(NLTAB)$(VBOX_VERSION_COMP_VALID_CHAR_SET))
$(error VBox: VBOX_VERSION_STRING='$(VBOX_VERSION_STRING)' contains too many parts (underscores), max 3!)
$(error VBox: The x.y.z part of VBOX_VERSION_STRING='$(VBOX_VERSION_STRING)' is malformed: '$(word 1,$(VBOX_VER_TMP1))')
$(error VBox: VBOX_VERSION_STRING='$(VBOX_VERSION_STRING)' does not start with VBOX_VERSION_STRING_RAW='$(VBOX_VERSION_STRING_RAW)')
if $(words $(VBOX_VER_TMP1)) == 3 || ($(words $(VBOX_VER_TMP1)) == 2 && "$(VBOX_BUILD_PUBLISHER)" == "")
$(error VBox: VBOX_VERSION_STRING='$(VBOX_VERSION_STRING)' uses an unknown build type: '$(word 2,$(VBOX_VER_TMP1))')
$(error VBox: VBOX_VERSION_STRING='$(VBOX_VERSION_STRING)' uses an unknown build type: '$(word 2,$(VBOX_VER_TMP1))')
VBOX_VERSION_STAMP = $(PATH_OUT)/version-stamp-raw-api-$(translate $(VBOX_VERSION_STRING)-$(VBOX_C_YEAR)-$(VBOX_VENDOR)-$(VBOX_PRODUCT)-$(VBOX_API_VERSION)-$(VBOX_BUILD_PUBLISHER),$(VBOX_BAD_CHAR_SET),,_)
VBOX_VERSION_HEADER = $(PATH_OUT)/version-generated.h
VBOX_VERSION_MK = $(PATH_OUT)/version-generated.mk
$(VBOX_VERSION_STAMP): | $(PATH_ROOT)/Config.kmk
VBOX_PACKAGE_HEADER = $(PATH_OUT)/package-generated.h
VBOX_PRODUCT_HEADER = $(PATH_OUT)/product-generated.h
# Used for external makefiles which cannot include Config.kmk
VBOX_LICENSE_VER_KMK = $(PATH_OUT)/license-version.kmk
$(QUIET)$(SED) -e "s/.*License version \([0-9.]*\) *[,&].*/VBOX_LICENSE_VER=\1/;t;d" --output $@ $(VBOX_BRAND_LICENSE_HTML)
Makefile.kmk: | $(VBOX_VERSION_HEADER) $(VBOX_VERSION_MK) $(VBOX_PRODUCT_HEADER) $(VBOX_PACKAGE_HEADER)
# tree to determine this it if .svn/wc.db or .svn/entries is found (the former
# repository), otherwise fall back on the Config.kmk revision.
VBOX_SVN_REV_KMK = $(PATH_OUT)/revision.kmk
VBOX_SVN_DEP := $(firstword $(wildcard $(PATH_ROOT)/.svn/wc.db $(abspath $(PATH_ROOT)/../.svn/wc.db) $(abspath $(PATH_ROOT)/../../.svn/wc.db) $(PATH_ROOT)/.svn/entries))
$(VBOX_SVN_REV_KMK).ts +| $(VBOX_SVN_REV_KMK): $(if $(VBOX_SVN_DEP), $(VBOX_SVN_DEP), $(PATH_ROOT)/Config.kmk)
$(SED) -e '/^Last Changed Rev/!d' -e 's/Last Changed Rev\: */export VBOX_SVN_REV=/' --output $@ $@.tmp
# only needed for VBoxGuest for Linux/FreeBSD guests
VBOX_SVN_REV_HEADER = $(PATH_OUT)/revision-generated.h
# a second XIDL file, from which the COM/XPCOM IDL files are then generated:
VBOX_XIDL_FILE_SRC = $(PATH_ROOT)/src/VBox/Main/idl/VirtualBox.xidl
# second XIDL file to use as source for COM/XPCOM IDL (with stripped docs):
VBOX_XIDL_FILE = $(PATH_OUT)/obj/VirtualBox_stripped.xidl
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands \
$(if-expr $(VBOX_XCODE_VERSION_MAJOR) >= 4,/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands,) \
) /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Commands)
if $(VBOX_XCODE_VERSION_MAJOR) >= 4 # Lion (4.1-preview 5) has a broken CurrentJDK link. Blindly applying it to 4.0.
VBOX_JAVA_INC = $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
VBOX_JAVA_INC = $(VBOX_PATH_MACOSX_SDK)/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Headers
$(PATH_DEVTOOLS)/linux.x86/jdk1.6.0_27 \
# VBOX_JAVA_HOME ?= /usr/jdk/jdk1.6.0
VBOX_JAVA_HOME ?= /usr/java
VBOX_JAVAC = $(VBOX_JAVA_HOME)/bin/javac
VBOX_JAVAH = $(VBOX_JAVA_HOME)/bin/javah
VBOX_JAR = $(VBOX_JAVA_HOME)/bin/jar
VBOX_JAVADOC = $(VBOX_JAVA_HOME)/bin/javadoc
VBOX_WSIMPORT = $(VBOX_JAVA_HOME)/bin/wsimport