Makefile.kmk revision 2a7c2c6cf74b4bf69770343650059641a1c00a6a
6982N/A# available from http://www.virtualbox.org. This file is free software;
173N/A# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
173N/Ainclude $(KBUILD_PATH)/subheader.kmk
173N/A LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
173N/A #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
3240N/A LIBRARIES.win.x86 += RuntimeGuestR0NT4
173N/A LIBRARIES.solaris += RuntimeR0Stub
173N/A LIBRARIES.win += RuntimeR0Stub
173N/A LIBRARIES.win.x86 += RuntimeR3VccTricks
173N/A LIBRARIES.solaris += RuntimeR0Stub
173N/A LIBRARIES.win += RuntimeR0Stub RuntimeRCStub
173N/A include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
173N/A include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
173N/A include $(PATH_SUB_CURRENT)/tools/Makefile.kmk
173N/A LIBRARIES.solaris += RuntimeR0Stub
173N/A LIBRARIES.win += RuntimeR0Stub
173N/A LIBRARIES.win += RuntimeRCStub
173N/A LIBRARIES.win.amd64 += RuntimeGuestR3-x86 RuntimeGuestR3Shared-x86
1177N/A #LIBRARIES.os2 += RuntimeGuestR0OS2Warp3
173N/A LIBRARIES.win.x86 += RuntimeGuestR0NT4
173N/A LIBRARIES.win.x86 += RuntimeR3VccTricks
173N/ALIBRARIES.win += RuntimeR3NtDll-x86
173N/A LIBRARIES.win += RuntimeR3NtDll-amd64
173N/A $(IPRT_OUT_DIR)/errmsgdata.h \
173N/A $(IPRT_OUT_DIR)/errmsgcomdata.h \
173N/A $(IPRT_OUT_DIR)/errmsgvboxcomdata.h \
173N/A $(IPRT_OUT_DIR)/errmsgvboxcomdata.h.ts \
173N/A $(IPRT_OUT_DIR)/Doxyfile.iprt \
173N/A $(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
1177N/A# Set the defines that buildconfig.cpp needs. Its used by several targets.
173N/A# Unicode Specification reader used to regenerate unidata.cpp.
173N/Auniread_SOURCES = common/string/uniread.cpp
173N/ARuntimeR3_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK)
173N/ARuntimeR3_DEFS = IN_RT_R3 IN_SUP_R3 LDR_WITH_NATIVE LDR_WITH_ELF32 LDR_WITH_PE RT_WITH_VBOX RT_NO_GIP
173N/A RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
173N/A $(PATH_ROOT)/src/libs/liblzf-3.4
173N/A $(PATH_ROOT)/src/libs/kStuff/kStuff/include
173N/A# RuntimeR3_SOURCES += common/time/timesupA.asm
173N/A RuntimeR3_SOURCES += common/time/timesupref.cpp
173N/A RuntimeR3_SOURCES += common/misc/lzjb.c
173N/A $(if $(VBOX_WITH_DBUS),VBox/dbus.cpp,)
RuntimeR3_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
RuntimeR3_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
# RuntimeGuestR3 - Guest Additions Runtime (static/exe).
RuntimeGuestR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
RuntimeGuestR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_HOST).$(KBUILD_TARGET_ARCH))
# RuntimeGuestR3Shared - Guest Additions Runtime (static/dll).
VBoxRT_SDKS.win = $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
$(filter-out common/checksum/crc32.cpp, $(RuntimeR3_SOURCES)) \
VBoxRT_SOURCES += common/misc/s3.cpp
VBoxRT_SOURCES += common/misc/http.cpp
VBoxRT_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_SOURCES.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
VBoxRT_SOURCES.win += \
$(VBoxRT_0_OUTDIR)/VBoxRT.def
VBoxRT_SOURCES.linux += \
VBoxRT_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) := $(RuntimeR3_INCS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
VBoxRT_LIBS.solaris += smbios
VBoxRT_LIBS.win = \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/vccomsup.lib \
$(PATH_SDK_$(VBOX_WINDDK)_LIB)/wbemuuid.lib
VBoxRT_LDFLAGS.darwin = -framework IOKit -framework CoreFoundation -framework CoreServices -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxRT.dylib
VBoxRT_LDFLAGS.win = /MANIFEST
$$(VBoxRT_0_OUTDIR)/VBoxRT.def: \
$(PATH_SUB_CURRENT)/r3/win/VBoxRT-$$(if-expr $$(KBUILD_TARGET_ARCH) == amd64,win64,win32).def \
ifneq ($(wildcard /usr/bin/chcon),)
VBoxRTDummy_LIBS = $(PATH_STAGE_BIN)/VBoxRT.so
VBoxRTDummy_CLEAN = $(PATH_STAGE_BIN)/VBoxRT.so
$(PATH_STAGE_BIN)/VBoxRT.so: $$(VBoxRT_1_TARGET) | $$(dir $$@)
# 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)
$(call VBOX_GENERATE_IMPORT_TARGET_FN,VBoxRTImp,VBoxRT,VBox/VBoxRTImp.def r3/win/VBoxRT-openssl-ose.def)
## @todo the *_alias.c stuff is busted, remove and use RT_WITH_NOCRT_ALIASES instead.
# RuntimeR0_SOURCES += common/time/timesupA.asm
RuntimeR0_SOURCES += common/time/timesupref.cpp
RuntimeR0_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
RuntimeR0_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
RuntimeR0Drv_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
RuntimeR0Drv_DEFS.win = IN_SUP_R0
RuntimeR0Drv_DEFS.linux = MODULE KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) IN_SUP_R0
RuntimeR0Drv_SOURCES.win.amd64 := $(RuntimeWin64ASM_SOURCES)
RuntimeR0Drv_SOURCES.win.x86 := $(RuntimeWin32ASM_SOURCES)
$(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
$(PATH_STAGE)/gen-sys-hdrs/device_if.h
# is in the backdoor logging and the lack of sup.h (which should be
RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES))
# RuntimeRC_SOURCES += common/time/timesupA.asm
RuntimeRC_SOURCES += common/time/timesupref.cpp
RuntimeRC_SOURCES.win.x86 = $(RuntimeWin32ASM_SOURCES)
RuntimeRC_SOURCES += os2/sys0.asm
RuntimeEFCPP_SOURCES := r3/alloc-ef-cpp.cpp
# later WINDDK ntdll.lib have and thus we may easily end up with
# errmsg.cpp depends on a generated header.
common/err/errmsg.cpp_INCS = $(IPRT_OUT_DIR)
win/errmsgwin.cpp_INCS = $(IPRT_OUT_DIR)
$(lib)_common/err/errmsgxpcom.cpp_INCS = $(IPRT_OUT_DIR)
$(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 \
$(IPRT_OUT_DIR)/errmsgcomdata.h: \
$(VBOX_PATH_RUNTIME_SRC)/common/err/errmsgcom.sed \
$$(PATH_SDK_$(VBOX_WINPSDK)_INC)/WinError.h \
$(VBOX_PATH_RUNTIME_SRC)/VBox/errmsgvboxcom.xsl \
$(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
VBOX_AWK := /usr/bin/awk
$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h \
$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h \
$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h
$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m | $$(dir $$@)
$(QUIET)$(CP) -f $< $(@D)/bus_if.m
$(QUIET)$(RM) $(@D)/bus_if.m
$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m | $$(dir $$@)
$(QUIET)$(CP) -f $< $(@D)/device_if.m
$(QUIET)$(RM) $(@D)/device_if.m
$$(FreeBSDGeneratedKernelHeaders_0_OUTDIR)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m | $$(dir $$@)
$(QUIET)$(CP) -f $< $(@D)/pci_if.m
$(QUIET)$(RM) $(@D)/pci_if.m
# Aliases for .cpp.h files so we can more easily do syntax checking from the editor.
$(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 \
$(foreach dir, $(VBOX_PATH_RUNTIME_SRC) $(VBOX_PATH_RUNTIME_SRC)/r3 $(VBOX_PATH_RUNTIME_SRC)/r0drv,\
$(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 \
$(filter-out %.cpp.h, $(sort $(wildcard $(addsuffix /*.h, $(IPRT_DOXYFILE_INPUT_DIRS)))) ) \
IPRT_DOXYFILE_OUTPUT = $(PATH_OUT)/docs/iprt
includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
$(IPRT_OUT_DIR)/Doxyfile.iprt: \
$(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
$(APPEND) $@.tmp "INCLUDE_PATH = $(PATH_ROOT)/include include . common/table"
$(APPEND) $@.tmp "INCLUDE_FILE_PATTERNS = *.cpp.h"
$(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
docs: $(IPRT_OUT_DIR)/docs.iprt
test-mangling:: $(IPRT_OUT_DIR)/mangling.run
OTHERS += $(IPRT_OUT_DIR)/mangling.run
CLEANS += $(IPRT_OUT_DIR)/mangling.run
$(IPRT_OUT_DIR)/mangling.run: \
# Generate a SED script from mangling.h that checks for known symbols.
$(PATH_ROOT)/include/iprt/mangling.h \
# Find the best way to generate a symbol list and subject it to mangling.h.
BLDPROGS.win += ntBldSymDb
ntBldSymDb_SOURCES = r0drv/nt/ntBldSymDb.cpp