Makefile.kmk revision 4ee2f4fc8e99dc69ba5d63fd7dd3f52a38d0501e
# $Id$
## @file
# Sub-Makefile for the IPRT.
#
#
# Copyright (C) 2006-2013 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
# The contents of this file may alternatively be used under the terms
# of the Common Development and Distribution License Version 1.0
# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
# VirtualBox OSE distribution, in which case the provisions of the
# CDDL are applicable instead of those of the GPL.
#
# You may elect to license modified versions of this file under the
# terms and conditions of either the GPL or the CDDL or both.
#
SUB_DEPTH = ../../..
include $(KBUILD_PATH)/subheader.kmk
ifdef VBOX_ONLY_ADDITIONS
#
# Only build the additions, sort out the legacy names first.
#
LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
ifdef VBOX_WITH_ADDITION_DRIVERS
LIBRARIES += RuntimeGuestR0
#LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
LIBRARIES.win.x86 += RuntimeGuestR0NT4
endif
else ifdef VBOX_ONLY_VALIDATIONKIT
#
# Only build the Validation Kit.
#
LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared RuntimeR3 RuntimeR0 RuntimeBldProg
LIBRARIES.solaris += RuntimeR0Stub
LIBRARIES.win += RuntimeR0Stub
LIBRARIES.win.x86 += RuntimeR3VccTricks
include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
else ifdef VBOX_ONLY_DOCS
#
# Build docs only - need just regular R3 runtime.
#
LIBRARIES += RuntimeR3 RuntimeBldProg
else ifdef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
#
# Build docs only - need just regular R3 runtime.
#
LIBRARIES += RuntimeBldProg
LIBRARIES.solaris += RuntimeR0Stub
LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
else # !VBOX_ONLY_ADDITIONS && !VBOX_ONLY_VALIDATIONKIT && !VBOX_ONLY_DOCS
#
# Normal build.
#
ifndef VBOX_ONLY_EXTPACKS
include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
endif
include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
BLDPROGS += uniread
LIBRARIES += RuntimeR3 RuntimeBldProg RuntimeR0 RuntimeEFCPP RuntimeR3NoCRTGCC
LIBRARIES.solaris += RuntimeR0Stub
LIBRARIES.win += RuntimeR0Stub
ifdef VBOX_WITH_RAW_MODE
LIBRARIES += RuntimeRC
LIBRARIES.win += RuntimeRCStub
endif
ifdef VBOX_WITH_VBOXDRV
LIBRARIES += RuntimeR0Drv
endif
ifdef VBOX_WITH_ADDITIONS
LIBRARIES += RuntimeGuestR3 RuntimeGuestR3Shared
LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
ifdef VBOX_WITH_ADDITION_DRIVERS
LIBRARIES += RuntimeGuestR0
endif
#LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
LIBRARIES.win.x86 += RuntimeGuestR0NT4
endif # VBOX_WITH_ADDITIONS
LIBRARIES.win.x86 += RuntimeR3VccTricks
DLLS += VBoxRT
ifdef VBOX_WITH_32_ON_64_MAIN_API
DLLS += VBoxRT-x86
endif
endif
# Always build the ntdll import libraries on windows.
LIBRARIES.win += RuntimeR3NtDll-x86
if1of (amd64, $(KBUILD_TARGET_ARCH) $(KBUILD_HOST_ARCH))
LIBRARIES.win += RuntimeR3NtDll-amd64
endif
# Always build the import library.
IMPORT_LIBS += VBoxRTImp
# Where the generated stuff goes.
IPRT_OUT_DIR := $(PATH_TARGET)/Runtime
BLDDIRS += $(IPRT_OUT_DIR)
OTHER_CLEAN += \
$(IPRT_OUT_DIR)/errmsgdata.h \
$(IPRT_OUT_DIR)/errmsgcomdata.h \
$(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
$(IPRT_OUT_DIR)/Doxyfile.iprt \
$(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
$(IPRT_OUT_DIR)/docs.iprt
#
# Globals
#
VBOX_PATH_RUNTIME_SRC := $(PATH_SUB_CURRENT)
#
# Set the defines that buildconfig.cpp needs. Its used by several targets.
#
IPRT_BLDCFG_SCM_REV=$(VBOX_SVN_REV) \
IPRT_BLDCFG_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
IPRT_BLDCFG_VERSION_MAJOR=$(VBOX_VERSION_MAJOR) \
IPRT_BLDCFG_VERSION_MINOR=$(VBOX_VERSION_MINOR) \
IPRT_BLDCFG_VERSION_BUILD=$(VBOX_VERSION_BUILD) \
IPRT_BLDCFG_TARGET=\"$(KBUILD_TARGET)\" \
IPRT_BLDCFG_TARGET_ARCH=\"$(KBUILD_TARGET_ARCH)\" \
IPRT_BLDCFG_TYPE=\"$(KBUILD_TYPE)\"
#
# Unicode Specification reader used to regenerate unidata-*.cpp.
#
uniread_TEMPLATE = VBoxBldProg
uniread_SOURCES = common/string/uniread.cpp
uniread_INCS = include
#
# Win64 assembly sources.
#
RuntimeWin64ASM_SOURCES = \
#
# Win32 assembly sources.
#
RuntimeWin32ASM_SOURCES = \
#
# NoCRT sources (minus math stuff).
#
if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
RuntimeNoCrt_SOURCES = \
endif
#
# RuntimeR3 - Static Runtime for Ring-3 executables.
#
RuntimeR3_TEMPLATE = VBoxR3Static
RuntimeR3_SDKS = VBOX_OPENSSL VBOX_LIBXML2
RuntimeR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
RuntimeR3_DEFS = \
IN_RT_R3 \
IN_SUP_R3 \
LDR_WITH_NATIVE \
LDR_WITH_ELF32 \
LDR_WITH_PE \
RT_WITH_VBOX \
RT_NO_GIP \
RT_WITHOUT_NOCRT_WRAPPERS \
IPRT_WITH_OPENSSL
#RuntimeR3_DEFS += RTMEM_WRAP_TO_EF_APIS
ifdef IPRT_WITH_KSTUFF
RuntimeR3_DEFS += LDR_WITH_KLDR
endif
ifdef IPRT_WITH_LZJB
RuntimeR3_DEFS += RTZIP_USE_LZJB
endif
ifdef IPRT_WITH_LZO
RuntimeR3_DEFS += RTZIP_USE_LZO
endif
ifn1of ($(KBUILD_TARGET), win)
RuntimeR3_DEFS += RT_WITH_ICONV_CACHE
endif
ifdef IPRT_WITH_FUTEX_BASED_SEMS
RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
endif
RuntimeR3_INCS = \
include \
$(SDK_VBOX_ZLIB_INCS)
RuntimeR3_INCS += \
$(PATH_ROOT)/src/libs/liblzf-3.4
ifdef IPRT_WITH_KSTUFF
RuntimeR3_INCS += \
$(PATH_ROOT)/src/libs/kStuff/kStuff/include
endif
# RuntimeR3_INCS.solaris = \
RuntimeR3_SOURCES = \
#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
# RuntimeR3_SOURCES += common/time/timesupA.asm
#else
RuntimeR3_SOURCES += common/time/timesupref.cpp
#endif
ifdef IPRT_WITH_LZJB
RuntimeR3_SOURCES += common/misc/lzjb.c
endif
# AMD64 / x86 assembly code.
# Some versions of GCC might require this.
ifdef IPRT_WITH_KSTUFF
RuntimeR3_SOURCES += \
endif
# VBox specific stuff.
RuntimeR3_SOURCES += \
ifneq ($(KBUILD_TARGET),win)
RuntimeR3_SOURCES += \
endif
if1of ($(KBUILD_TARGET),freebsd linux netbsd openbsd solaris)
RuntimeR3_SOURCES += \
$(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
endif
VBOX_WITH_NT_DIRENUM = 1
generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
$(if-expr defined(VBOX_WITH_NT_DIRENUM),r3/nt/direnum-r3-nt.cpp,r3/win/direnum-win.cpp) \
RuntimeR3_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
RuntimeR3_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
ifdef IPRT_WITH_FUTEX_BASED_SEMS
else
ifdef RT_NEW_LINUX_MUTEX_CODE
else
endif
endif
generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),lockless-,)generic.cpp \
## @todo Make BSD sched, implement RTMP*.
generic/semrw-$(if-expr defined(VBOX_WITH_LOCKLESS_SEMRW),ockless-,)generic.cpp \
## PORTME: Porters add their selection of platform specific files for Ring-3 here.
#
# RuntimeBldProg - Static Runtime for build programs.
#
# Note! This is a bit of hacky since kBuild doesn't support building libraries
# for build programs.
#
RuntimeBldProg_TEMPLATE := VBoxAdvBldProg
RuntimeBldProg_EXTENDS := RuntimeR3
RuntimeBldProg_BLD_TRG := $(KBUILD_HOST)
RuntimeBldProg_BLD_TRG_ARCH := $(KBUILD_HOST_ARCH)
RuntimeBldProg_BLD_TRG_CPU := $(KBUILD_HOST_CPU)
RuntimeBldProg_DEFS := $(filter-out IN_SUP_R3 IN_SUP, $(RuntimeR3_DEFS)) IPRT_WITHOUT_LDR_VERIFY RT_NO_GIP
RuntimeBldProg_SOURCES = $(filter-out \
, $(RuntimeR3_SOURCES))
#
# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
# (The KBUILD_HOST inheritance here is for cross building the linux
# additions, while .x86 is for cross building x86 while targeting amd64.)
#
RuntimeGuestR3_TEMPLATE := VBoxGuestR3Lib
## @todo change this to EXTEND the RuntimeR3 target.
RuntimeGuestR3_DEFS := $(filter-out RTCRITSECT_STRICT RT_NO_GIP IPRT_WITH_OPENSSL, $(RuntimeR3_DEFS))
RuntimeGuestR3_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
RuntimeGuestR3_DEFS.$(KBUILD_HOST) := $(RuntimeR3_DEFS.$(KBUILD_HOST))
RuntimeGuestR3_INCS := $(RuntimeR3_INCS)
RuntimeGuestR3_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
RuntimeGuestR3_INCS.$(KBUILD_HOST) := $(RuntimeR3_INCS.$(KBUILD_HOST))
RuntimeGuestR3_SOURCES := $(filter-out \
, $(RuntimeR3_SOURCES))
RuntimeGuestR3_SOURCES += \
RuntimeGuestR3_SOURCES.$(KBUILD_TARGET) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
RuntimeGuestR3_SOURCES.$(KBUILD_HOST) := $(RuntimeR3_SOURCES.$(KBUILD_HOST))
RuntimeGuestR3_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).amd64:= $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
#
# RuntimeGuestR3-x86 - Same as RuntimeGuestR3, except that it's targeting x86.
#
RuntimeGuestR3-x86_EXTENDS := RuntimeGuestR3
RuntimeGuestR3-x86_BLD_TRG_ARCH := x86
#
# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
#
RuntimeGuestR3Shared_TEMPLATE := VBoxGuestR3Dll
RuntimeGuestR3Shared_EXTENDS := RuntimeGuestR3
RuntimeGuestR3Shared_INST = $(INST_ADDITIONS_LIB)
#
# RuntimeGuestR3Shared-x86 - Same as RuntimeGuestR3Shared, except that it's targeting x86.
#
RuntimeGuestR3Shared-x86_EXTENDS := RuntimeGuestR3Shared
RuntimeGuestR3Shared-x86_BLD_TRG_ARCH := x86
#
# VBoxRT - Shared Object / DLL version.
#
VBoxRT_TEMPLATE = VBoxR3DllNoPic
VBoxRT_SDKS = VBOX_LIBXML2
ifdef VBOX_WITH_LIBCURL
VBoxRT_SDKS += VBOX_LIBCURL
endif
VBoxRT_SDKS += VBOX_OPENSSL
VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
if1of ($(KBUILD_TARGET)$(VBOX_WITH_HARDENING), darwin win$(VBOX_WITH_HARDENING))
VBoxRT_INST = $(INST_DLL) $(INST_TESTCASE)
endif
VBoxRT_DEFS := $(filter-out RT_NO_GIP, $(RuntimeR3_DEFS)) \
IN_SUP_R3 IN_SUP_R3 IPRT_WITH_XAR \
$(if-expr !defined(VBOX_WITH_ALT_HASH_CODE),IPRT_WITHOUT_SHA512T224 IPRT_WITHOUT_SHA512T256,)
ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
VBoxRT_DEFS += RT_NO_GIP
endif
ifdef VBOX_WITH_LIBCURL
VBoxRT_DEFS += IPRT_WITH_HTTP
endif
VBoxRT_DEFS.$(KBUILD_TYPE) := $(RuntimeR3_DEFS.$(KBUILD_TYPE))
VBoxRT_SOURCES := \
$(filter-out common/checksum/crc32.cpp, \
$(if-expr defined(VBOX_WITH_ALT_HASH_CODE), $(RuntimeR3_SOURCES), \
$(patsubst common/checksum/alt-%,common/checksum/openssl-%,$(RuntimeR3_SOURCES)) ) ) \
ifdef VBOX_WITH_LIBCURL
VBoxRT_SOURCES += common/misc/s3.cpp
VBoxRT_SOURCES += common/misc/http.cpp
endif
VBoxRT_SOURCES.$(KBUILD_TARGET) = $(RuntimeR3_SOURCES.$(KBUILD_TARGET))
VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
VBoxRT_SOURCES.$(KBUILD_TARGET).x86 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).x86)
VBoxRT_SOURCES.$(KBUILD_TARGET).amd64 := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).amd64)
VBoxRT_SOURCES.$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET_ARCH))
VBoxRT_SOURCES.win += \
$(VBoxRT_0_OUTDIR)/VBoxRT.def
VBoxRT_SOURCES.linux += \
VBoxRT_INCS := $(RuntimeR3_INCS)
VBoxRT_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
VBoxRT_LIBS = \
$(PATH_STAGE_LIB)/VBox-liblzf$(VBOX_SUFF_LIB)
if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
VBoxRT_LIBS += \
$(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB)
endif
ifdef IPRT_WITH_KSTUFF
VBoxRT_LIBS += \
$(PATH_STAGE_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
endif
ifndef SDK_VBOX_LIBXML2_LIBS
VBoxRT_LIBS += \
$(PATH_STAGE_LIB)/VBox-libxml2$(VBOX_SUFF_LIB)
endif
VBoxRT_LIBS += \
$(SDK_VBOX_ZLIB_LIBS)
ifndef SDK_VBOX_OPENSSL_LIBS
VBoxRT_LIBS += \
$(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VBox-libssl$(VBOX_SUFF_LIB)
endif
ifdef IPRT_WITH_LZO
VBoxRT_LIBS += lzo2
endif
crypt
iconv
iconv \
rt
iconv
kstat \
contract
ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
# SMBIOS not available on Solaris SPARC.
VBoxRT_LIBS.solaris += smbios
endif
VBoxRT_LIBS.win = \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/delayimp.lib
VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -framework CoreServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
VBoxRT_LDFLAGS.win = /MANIFEST \
/delayload:gdi32.dll \
/delayload:user32.dll \
/delayload:shell32.dll \
/delayload:ole32.dll \
/delayload:oleaut32.dll \
/delayload:advapi32.dll
if1of ($(DLLS), VBoxRT)
$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
$(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
$(RM) -f -- $@
$(REDIRECT) -wto $@ -- $(CAT_EXT) $^
endif
#
# HACK ALERT! Make testcase run during build on SELinux boxes.
# Create a dummy DLL that ensure that VBoxRT is installed
# during the DLL pass and cleaned up later.
#
ifeq ($(KBUILD_TARGET),linux)
if1of (VBoxRT, $(DLLS))
ifneq ($(wildcard /usr/bin/chcon),)
VBoxRT_INSTTYPE = none
VBoxRT_DEBUG_INSTTYPE = both
DLLS += VBoxRTDummy
VBoxRTDummy_TEMPLATE = VBoxR3Dll
VBoxRTDummy_INSTTYPE = none
VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
BLDDIRS += $(PATH_STAGE_BIN)
$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
$(INSTALL) $< $@
chcon -t texrel_shlib_t $@ || true
VBoxRT:: VBoxRTDummy
endif # chcon present.
endif # building VBoxRT
endif # linux
#
# VBoxRT-x86 - 32-bit version of VBoxRT
#
VBoxRT-x86_EXTENDS = VBoxRT
VBoxRT-x86_TEMPLATE = VBoxR3Dll-x86
VBoxRT-x86_INST.win = $(INST_DLL)x86/
VBoxRT-x86_SDKS = VBOX_LIBXML2
ifdef VBOX_WITH_LIBCURL
VBoxRT-x86_SDKS += VBOX_LIBCURL-x86
endif
VBoxRT-x86_SDKS += VBOX_OPENSSL-x86
VBoxRT-x86_LIBS = \
$(PATH_STAGE_LIB)/VBox-liblzf-x86$(VBOX_SUFF_LIB)
if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
VBoxRT-x86_LIBS += \
$(PATH_STAGE_LIB)/SUPR3-x86$(VBOX_SUFF_LIB)
endif
ifdef IPRT_WITH_KSTUFF
VBoxRT-x86_LIBS += \
$(PATH_STAGE_LIB)/VBox-kStuff-x86$(VBOX_SUFF_LIB)
endif
ifndef SDK_VBOX_LIBXML2_LIBS
VBoxRT-x86_LIBS += \
$(PATH_STAGE_LIB)/VBox-libxml2-x86$(VBOX_SUFF_LIB)
endif
VBoxRT-x86_LIBS += \
$(SDK_VBOX_ZLIB_LIBS-x86)
ifndef SDK_VBOX_OPENSSL_LIBS
VBoxRT-x86_LIBS += \
$(PATH_STAGE_LIB)/VBox-libcrypto-x86$(VBOX_SUFF_LIB) \
$(PATH_STAGE_LIB)/VBox-libssl-x86$(VBOX_SUFF_LIB)
endif
ifdef IPRT_WITH_LZO
VBoxRT-x86_LIBS += lzo2
endif
crypt
iconv
iconv \
rt
iconv
kstat \
contract
ifn1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
# SMBIOS not available on Solaris SPARC.
VBoxRT-x86_LIBS.solaris += smbios
endif
$(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/vccomsup.lib \
$(PATH_SDK_$(VBOX_WINDDK)_LIB.x86)/wbemuuid.lib \
$(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)X86_LIB)/delayimp.lib
VBoxRT-x86_SOURCES.win = $(filter-out %.def,$(VBoxRT_SOURCES.win)) \
$(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def
if1of ($(DLLS), VBoxRT-x86)
$$(VBoxRT-x86_0_OUTDIR)/VBoxRT-x86.def: \
$(PATH_SUB_CURRENT)/r3/win/VBoxRT-win32.def \
$(RM) -f -- $@
$(REDIRECT) -wto $@ -- $(CAT_EXT) $^
endif
#
# VBoxRTImp - Import library/hack.
#
ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.amd64)
$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win64.def)
else ifeq ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH),win.x86)
$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def r3/win/VBoxRT-win32.def)
else
$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def)
endif
#
# RuntimeR3NoCRTGCC - CRT replacement lib for VBoxREM.
# This is used together with VBoxRT.
#
## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
RuntimeR3NoCRTGCC_TEMPLATE = VBoxNoCrtGccLib
RuntimeR3NoCRTGCC_LIBSUFF = $(VBOX_SUFF_LIB)
ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
RuntimeR3NoCRTGCC_DEFS += RT_NO_GIP
endif
RuntimeR3NoCRTGCC_INCS = include
RuntimeR3NoCRTGCC_SOURCES := \
\
$(RuntimeNoCrt_SOURCES)
if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
RuntimeR3NoCRTGCC_SOURCES += \
\
endif
#
# RuntimeR0 - Ring-0 library for VMMR0.
#
RuntimeR0_TEMPLATE = VBoxR0
RuntimeR0_DEFS = IN_RT_R0 RT_WITH_VBOX
ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
RuntimeR0_DEFS += RT_NO_GIP
endif
RuntimeR0_INCS = include
RuntimeR0_SOURCES := \
\
$(RuntimeNoCrt_SOURCES)
if1of ($(KBUILD_TARGET), darwin solaris freebsd)
RuntimeR0_SOURCES += \
endif
#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
# RuntimeR0_SOURCES += common/time/timesupA.asm
#else
RuntimeR0_SOURCES += common/time/timesupref.cpp
#endif
RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
#
# RuntimeR0Stub - Ring-0 context startup stub for Windows and Solaris.
#
RuntimeR0Stub_TEMPLATE = $(if-expr "$(KBUILD_TARGET)" == "solaris",VBoxR0DrvLib,VBoxR0)
#
# RuntimeR0Drv - Ring-0 library for host drivers.
#
RuntimeR0Drv_TEMPLATE = VBoxR0DrvLib
RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS VBOX_OPENSSL
RuntimeR0Drv_DEFS = IN_RT_R0 RT_WITH_VBOX RT_WITHOUT_NOCRT_WRAPPERS RT_NO_EXPORT_SYMBOL
RuntimeR0Drv_DEFS.win = IN_SUP_R0 LDR_ONLY_PE
RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
RuntimeR0Drv_INCS := $(PATH_SUB_CURRENT) include
$(PATH_STAGE)/gen-sys-hdrs
RuntimeR0Drv_SOURCES = \
\
RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
\
\
## PORTME: Porters create and add their selection of platform specific Ring-0 Driver files here.
$(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
$(PATH_STAGE)/gen-sys-hdrs/device_if.h
#
# RuntimeGuestR0 - Guest driver runtime.
# This is almost the same as the RuntimeR0Drv, the main difference
# is in the backdoor logging and the lack of sup.h (which should be
# made irrelevant even for RuntimeR0Drv).
#
RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB
RuntimeGuestR0_EXTENDS = RuntimeR0Drv
RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
RuntimeGuestR0_SOURCES += \
#
# RuntimeGuestR0NT4 - Win32 NT4 guest driver runtime.
#
RuntimeGuestR0NT4_EXTENDS = RuntimeGuestR0
RuntimeGuestR0NT4_EXTENDS_BY = appending
RuntimeGuestR0NT4_DEFS = IPRT_TARGET_NT4
ifdef VBOX_WITH_RAW_MODE
#
# RuntimeRC - Raw-mode context library.
#
RuntimeRC_TEMPLATE = VBoxRc
RuntimeRC_DEFS = IN_RT_RC RT_WITH_VBOX
RuntimeRC_INCS = include
RuntimeRC_SOURCES := \
\
$(RuntimeNoCrt_SOURCES)
#if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
# RuntimeRC_SOURCES += common/time/timesupA.asm
#else
RuntimeRC_SOURCES += common/time/timesupref.cpp
#endif
RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
ifeq ($(VBOX_LDR_FMT32),lx)
RuntimeRC_SOURCES += os2/sys0.asm
endif
if1of ($(KBUILD_TARGET), darwin solaris freebsd)
RuntimeRC_SOURCES += \
endif
#
# RuntimeRCStub - Raw-mode context startup stub for Windows.
#
RuntimeRCStub_TEMPLATE = VBoxRc
endif # VBOX_WITH_RAW_MODE
#
# Static library for new & delete for the electric fence.
#
RuntimeEFCPP_TEMPLATE := $(VBoxRT_TEMPLATE)
RuntimeEFCPP_SDKS := $(RuntimeR3_SDKS)
RuntimeEFCPP_SDKS.$(KBUILD_TARGET) := $(RuntimeR3_SDKS.$(KBUILD_TARGET))
RuntimeEFCPP_DEFS := $(RuntimeR3_DEFS)
RuntimeEFCPP_DEFS.$(KBUILD_TARGET) := $(RuntimeR3_DEFS.$(KBUILD_TARGET))
RuntimeEFCPP_INCS := $(RuntimeR3_INCS)
RuntimeEFCPP_INCS.$(KBUILD_TARGET) := $(RuntimeR3_INCS.$(KBUILD_TARGET))
RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
#
# The NTDLL mini import library.
#
# Note! The reason for doing this is to avoid importing CRT symbols from the
# NTDLL. We do not wish to do this because:
# - Our compiler is usually a different one and we should use the
# matching CRT,
# - Older versions of NTDLL may not sport all the exports our w2k3 or
# later WINDDK ntdll.lib have and thus we may easily end up with
# images that does not load on older windows versions.
#
if1of (win,$(KBUILD_TARGET) $(KBUILD_HOST))
RuntimeR3NtDll-amd64_TEMPLATE = VBoxR3Dll
RuntimeR3NtDll-amd64_BLD_TRG_ARCH = amd64
RuntimeR3NtDll-amd64_ARFLAGS = /NODEFAULTLIB /MACHINE:amd64
RuntimeR3NtDll-amd64_SOURCES = \
RuntimeR3NtDll-x86_TEMPLATE = VBoxR3Dll
RuntimeR3NtDll-x86_BLD_TRG_ARCH = x86
RuntimeR3NtDll-x86_ARFLAGS = /NODEFAULTLIB /MACHINE:x86
RuntimeR3NtDll-x86_SOURCES = \
$(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
RuntimeR3NtDll-x86_CLEAN = \
$(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm
$$(RuntimeR3NtDll-x86_0_OUTDIR)/ntdll-mini-implib.asm: $(PATH_SUB_CURRENT)/r3/win/ntdll-mini-implib.def | $$(dir $$@)
$(call MSG_GENERATE,,$@,$<)
$(QUIET)$(APPEND) -nt "$@" \
';Autogenerated, do not edit' \
'%include "iprt/asmdefs.mac"' \
'BEGINCODE' \
'%macro IMPLIB_EXPORT 1' \
'global %1:function' \
'%1: nop' \
'%endm' \
''
$(QUIET)$(SED) -e '1,/EXPORTS/d' \
-e 's/^.*;;=[[:space:]]*\([^[:space:]]*\)[[:space:]]*$$/IMPLIB_EXPORT \1/' \
$< --append $@
endif
#
# Bag of tricks required for making VCC100 output binaries work on NT4, W2K
# early XP and early W2K3.
#
RuntimeR3VccTricks_TEMPLATE = VBoxR3Dll
RuntimeR3VccTricks_SOURCES = \
#
# errmsg.cpp depends on a generated header.
#
common/err/errmsg.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgdata.h
common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgcomdata.h
win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
# Our COM errors only for R3 libraries on the host
define def_errmsgwin_deps
$(lib)_win/errmsgwin.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
$(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
$(lib)_common/err/errmsgxpcom.cpp_DEPS = $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
endef
$(foreach lib,RuntimeR3 RuntimeBldProg VBoxRT VBoxRT-x86,$(eval $(def_errmsgwin_deps)))
#
# Generate the status code data.
#
$(IPRT_OUT_DIR)/errmsgdata.h: \
$(VBOX_PATH_RUNTIME_SRC)/common/err/errmsg.sed \
$(PATH_ROOT)/include/iprt/err.h \
$(PATH_ROOT)/include/VBox/err.h \
| $$(dir $$@)
$(call MSG_GENERATE,,$@,$(filter %.h,$^))
$(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
## @todo r=bird: rename this to indicate that it's not only COM errors, but all win32/64 errors.
$(IPRT_OUT_DIR)/errmsgcomdata.h: \
$(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
$$(PATH_SDK_$(VBOX_WINPSDK)_INC)/WinError.h \
| $$(dir $$@)
$(call MSG_GENERATE,,$@,$(filter %.h,$^))
$(QUIET)$(REDIRECT) -wo $@ -- $(SED) -f $< $(filter %.h,$^)
$(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts +| $(IPRT_OUT_DIR)/errmsgvboxcomdata.h: \
$(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
$(VBOX_XIDL_FILE_SRC) \
| $$(dir $$@)
$(call MSG_GENERATE,,$@,$(filter %.xidl,$^))
$(QUIET)$(VBOX_XSLTPROC) -o $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $< $(filter %.xidl,$^)
$(QUIET)$(CP) --changed -fv $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts $(IPRT_OUT_DIR)/errmsgvboxcomdata.h
if "$(KBUILD_TARGET)" == "freebsd"
#
# FreeBSDGeneratedKernelHeaders - Generate some kernel interface headers.
#
# These are used by:
# - The RTMp* API in IPRT.
# - VBoxGuest
#
# Note! We cannot give a output path to the awk program, it will always
# generate the header next to the source. So, we'll have to temporarily copy
# the source file to the destination directory to work.
#
VBOX_AWK := /usr/bin/awk
INSTALLS += FreeBSDGeneratedKernelHeaders
FreeBSDGeneratedKernelHeaders_INST = gen-sys-hdrs/
FreeBSDGeneratedKernelHeaders_SOURCES = \
$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
FreeBSDGeneratedKernelHeaders_CLEAN = $(FreeBSDGeneratedKernelHeaders_SOURCES)
$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
$(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
$(QUIET)$(CP) -f $< $(@D)/bus_if.m
$(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/bus_if.m -h -p
$(QUIET)$(RM) $(@D)/bus_if.m
$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
$(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
$(QUIET)$(CP) -f $< $(@D)/device_if.m
$(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/device_if.m -h -p
$(QUIET)$(RM) $(@D)/device_if.m
$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
$(call MSG_TOOL,awk,FreeBSDGeneratedKernelHeaders,$<,$@)
$(QUIET)$(CP) -f $< $(@D)/pci_if.m
$(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(@D)/pci_if.m -h -p
$(QUIET)$(RM) $(@D)/pci_if.m
endif # FreeBSD
#
# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
#
#
# Doxygen documentation.
#
IPRT_DOXYFILE_INPUT_DIRS = \
$(PATH_ROOT)/include/iprt \
$(PATH_ROOT)/include/iprt/cpp \
$(PATH_ROOT)/include/iprt/linux \
$(PATH_ROOT)/include/iprt/nocrt \
$(PATH_ROOT)/include/iprt/nocrt/x86 \
$(PATH_ROOT)/include/iprt/nocrt/amd64 \
$(PATH_ROOT)/include/iprt/nocrt/compiler \
$(VBOX_PATH_RUNTIME_SRC)/include/internal \
$(VBOX_PATH_RUNTIME_SRC)/common/alloc \
$(VBOX_PATH_RUNTIME_SRC)/common/asm \
$(VBOX_PATH_RUNTIME_SRC)/common/checksum \
$(VBOX_PATH_RUNTIME_SRC)/common/dbg \
$(VBOX_PATH_RUNTIME_SRC)/common/err \
$(VBOX_PATH_RUNTIME_SRC)/common/ldr \
$(VBOX_PATH_RUNTIME_SRC)/common/log \
$(VBOX_PATH_RUNTIME_SRC)/common/math \
$(VBOX_PATH_RUNTIME_SRC)/common/math/amd64 \
$(VBOX_PATH_RUNTIME_SRC)/common/math/gcc \
$(VBOX_PATH_RUNTIME_SRC)/common/math/x86 \
$(VBOX_PATH_RUNTIME_SRC)/common/misc \
$(VBOX_PATH_RUNTIME_SRC)/common/path \
$(VBOX_PATH_RUNTIME_SRC)/common/rand \
$(VBOX_PATH_RUNTIME_SRC)/common/string \
$(VBOX_PATH_RUNTIME_SRC)/common/table \
$(VBOX_PATH_RUNTIME_SRC)/common/time \
$(VBOX_PATH_RUNTIME_SRC)/VBox \
$(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
$(dir) \
$(dir)/darwin \
$(dir)/haiku \
$(dir)/linux \
$(dir)/nt \
$(dir)/os2 \
$(dir)/solaris \
$(dir)/win \
$(dir)/win32 \
$(dir)/win64 \
$(dir)/generic \
)
# These must come first in order to make things look nice.
IPRT_DOXYFILE_INPUT_FIRST =\
$(PATH_ROOT)/include/iprt/cdefs.h \
$(PATH_ROOT)/include/iprt/types.h \
$(PATH_ROOT)/include/iprt/runtime.h \
$(PATH_ROOT)/include/iprt/param.h \
$(PATH_ROOT)/include/iprt/assert.h \
$(PATH_ROOT)/include/iprt/asm.h \
IPRT_DOXYFILE_INPUT := \
$(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
$(foreach dir, $(IPRT_DOXYFILE_INPUT_DIRS), $(wildcard $(dir)/*.cpp $(dir)/.c $(dir)/.asm))
IPRT_DOXYFILE_INPUT := \
$(IPRT_DOXYFILE_INPUT_FIRST) \
$(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
# Generate the Doxyfile
$(IPRT_OUT_DIR)/Doxyfile.iprt: \
$(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
$(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
$(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
| $$(dir $$@)
$(RM) -f $@ $@.tmp $@.dep
$(CP) -f $(VBOX_PATH_RUNTIME_SRC)/Doxyfile $@.tmp
$(APPEND) $@.tmp
$(APPEND) $@.tmp "OUTPUT_DIRECTORY = $(IPRT_DOXYFILE_OUTPUT)"
$(APPEND) $@.tmp "WARN_LOGFILE = $(IPRT_DOXYFILE_OUTPUT)/errors"
$(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
$(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
$(APPEND) $@.tmp "PREDEFINED += $(ARCH_BITS_DEFS)"
$(APPEND) $@.tmp
$(APPEND) $@.tmp "INPUT = $(IPRT_DOXYFILE_INPUT)"
$(APPEND) $@.tmp
$(MV) -f $@.tmp $@
@$(APPEND) $@.dep "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
@$(APPEND) $@.dep "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
# Do the actual job.
$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
$(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
doxygen $(IPRT_OUT_DIR)/Doxyfile.iprt
$(APPEND) $(IPRT_OUT_DIR)/docs.iprt
# aliases
if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
docs: $(IPRT_OUT_DIR)/docs.iprt
endif
test-doxygen::
@echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
@echo $(IPRT_DOXYFILE_OUTPUT)
@echo $(DOXYGEN_OUTPUT_PREV)
@echo $(IPRT_DOXYFILE_INPUT)
#
# Test mangling.
#
if1of ($(LIBRARIES),RuntimeR3 RuntimeR0 RuntimeR0Drv RuntimeRC)
test-mangling:: $(IPRT_OUT_DIR)/mangling.run
OTHERS += $(IPRT_OUT_DIR)/mangling.run
CLEANS += $(IPRT_OUT_DIR)/mangling.run
$(IPRT_OUT_DIR)/mangling.run: \
$$(RuntimeR3_1_TARGET) \
$$(RuntimeR0_1_TARGET) \
$$(RuntimeR0Drv_1_TARGET) \
$$(RuntimeRC_1_TARGET)
if1of ($(KBUILD_TARGET), win os2)
$(call MSG_L1,IPRT: skipped mangling test.)
else
# Generate a SED script from mangling.h that checks for known symbols.
$(QUIET)$(SED) \
-e '/# *define.*RT_MANGLER/!d' \
-e 's/^.*RT_MANGLER(\([^)][^)]*\)).*$(DOLLAR)/\/^\1$(DOLLAR)\/b ok/' \
$(PATH_ROOT)/include/iprt/mangling.h \
--output "$@"
$(QUIET)$(APPEND) -n '$@' \
':bad' \
's/^\(.*\)$(DOLLAR)/error: Missing # define \1 /' \
':bad-pad' \
'/^.\{0,70\}$(DOLLAR)/ { s/$(DOLLAR)/ /; bbad-pad; }' \
's/define \([^ ]*\) \([ ]*\)$(DOLLAR)/define \1 \2RT_MANGLER(\1)/' \
'p' \
$(if-expr !defined(IPRT_IGNORE_TEST_MANGLING),'q 1') \
'' \
':ok' \
'd'
# Find the best way to generate a symbol list and subject it to mangling.h.
if $(intersects $(KBUILD_TARGET), linux) && "$(VBOX_GCC_fvisibility-hidden)"
$(call MSG_L1,IPRT: Testing mangling and visiblity for newer gcc...)
$(QUIET)readelf -Ws $^ \
| $(SED) \
-e 's/[[:space:]]\+/ /g' \
-e '/^ *[[:digit:]]\+:/!d' \
-e 's/^ \+[[:digit:]]\+: \+[[:xdigit:]]\+ \+[[:digit:]]\+ \+//' \
-e '/^SECTION/d' \
-e '/^FILE/d' \
-e 's/^[[:alpha:]]\+ \+//' \
-e '/LOCAL/d' \
-e 's/^[[:alpha:]]\+ \+//' \
-e '/^HIDDEN [[:xdigit:]]\+ RT/bkeep-hidden' \
-e '/^HIDDEN [[:xdigit:]]\+ g_[a-z0-9]*RT/bkeep-hidden' \
-e '/^HIDDEN/d' \
-e ':keep-hidden' \
-e 's/^[[:alpha:]]\+ \+//' \
-e '/^UND/d' \
-e 's/^[[:digit:]]\+ \+//' \
\
-e '/^nocrt_/d' \
-e '/^memchr/d' \
-e '/^memcmp/d' \
-e '/^memcpy/d' \
-e '/^mempcpy/d' \
-e '/^memmove/d' \
-e '/^memset/d' \
-e '/^strchr/d' \
-e '/^strpbrk/d' \
-e '/^_Z7strpbrk/d' \
-e '/^strcmp/d' \
-e '/^strcpy/d' \
-e '/^strncpy/d' \
-e '/^strlen/d' \
-e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
-e '/^_Z[[:alpha:]]*[[:digit:]]\+RTC/d' \
\
-e '/^_ZnwjPv/d' \
-e '/^_ZnwmPv/d' \
-e '/^_ZNSt9bad_allocC1Ev/d' \
-e '/^_ZNSt9exceptionC2Ev/d' \
-e '/^_ZNSt9exceptionC[12]ERKS_/d' \
\
-e '/^_ZN[a-zA-Z]*St[[:digit:]]*_*[lL]ist/d' \
-e '/^_ZN[a-zA-Z]*[[:digit:]]*__gnu_cxx/d' \
-e '/^_ZNSa.*ElementNode.*/d' \
-e '/^_ZSt.*ElementNode.*/d' \
\
-e '/^_Z[[:digit:]]\+dbus/d' \
-e '/^_Z13RTDBusLoadLibv/d' \
\
-e '/^VBoxHost_/d'\
-e '/^VBoxGuest_/d'\
| $(SED) -nf "$@"
endif
$(call MSG_L1,IPRT: Testing mangling using nm...)
$(QUIET)nm $^ 2> /dev/null \
| $(SED) -n \
-e 's/^[0-9a-f][0-9a-f]* //' \
-e '/^[TUDB] /!d' \
-e 's/^. //' \
$(if-expr "$(KBUILD_TARGET)" == "darwin" || "$(KBUILD_TARGET)" == "os2" || "$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)" == "win.x86", \
-e 's/^_//',) \
\
-e '/^g_cchrt/d'\
-e '/^g_frt/d'\
-e '/^g_offrt/d'\
-e '/^g_pfnrt/d'\
-e '/^g_rt/d'\
-e '/^g_szrt/d'\
-e '/^g_ProcessSelf/d'\
-e '/^g_u64ProgramStart/d'\
-e '/^g_enmProcessPriority/d'\
-e '/^g_hDbgModStrCache/d'\
-e '/^g_pfnR0Darwin/d'\
-e '/^g_pDarwinLockGroup/d'\
\
-e '/^RTDBusLoadLib/d' \
\
-e '/^RT/p' \
-e '/^g_/p' \
| $(SED) -nf "$@"
endif
endif
$(QUIET)$(APPEND) -t $@
if !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_VALIDATIONKIT) && !defined(VBOX_ONLY_DOCS)
#
# Windows build tool.
#
BLDPROGS.win += ntBldSymDb
ntBldSymDb_TEMPLATE = VBoxAdvBldProg
ntBldSymDb_INCS = .
ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp
endif
#
# Generate the rules (we're the to sub-makefile).
#
include $(FILE_KBUILD_SUB_FOOTER)
#
# Aliases for code templates.
#