Makefile.kmk revision 66ea204fee5b52547bf4f9ed20bf4020ff0ac55e
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Sub-Makefile for the support library and the drivers/modules/kexts it uses.
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# available from http://www.virtualbox.org. This file is free software;
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# you can redistribute it and/or modify it under the terms of the GNU
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# General Public License (GPL) as published by the Free Software
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# The contents of this file may alternatively be used under the terms
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# of the Common Development and Distribution License Version 1.0
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# VirtualBox OSE distribution, in which case the provisions of the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# CDDL are applicable instead of those of the GPL.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# You may elect to license modified versions of this file under the
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# terms and conditions of either the GPL or the CDDL or both.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# additional information or have any questions.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUB_DEPTH = ../../../..
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
628ddfbd43ad5365d69fddda4007598242956577vboxsyncLIBRARIES += SUPR3 SUPR3HardenedStatic
628ddfbd43ad5365d69fddda4007598242956577vboxsyncifndef VBOX_ONLY_DOCS
628ddfbd43ad5365d69fddda4007598242956577vboxsync ifeq ($(filter-out pe lx,$(VBOX_LDR_FMT)),)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync LIBRARIES += SUPR0
3c520cf6887d9039d9aa7cf3bbe81fd7de1ffd4cvboxsync ifdef VBOX_WITH_SUPSVC
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync PROGRAMS += VBoxSupSvc
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync ifdef VBOX_WITH_VBOXDRV
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync LIBRARIES += SUPR0IdcClient
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync INSTALLS.linux += vboxdrv-mod vboxdrv-sh
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync INSTALLS.freebsd += vboxdrv-mod vboxdrv-sh
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync # Include sub-makefile(s).
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync include $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync # Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync ifeq ($(KBUILD_TARGET),linux)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync include $(PATH_SUB_CURRENT)/linux/files_vboxdrv
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync ifeq ($(KBUILD_TARGET),freebsd)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync include $(PATH_SUB_CURRENT)/freebsd/files_vboxdrv
ae5379e3e7573369566d4628ef6c597da693cc55vboxsyncendif # !VBOX_ONLY_DOCS
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncifneq ($(filter l4%,$(KBUILD_TARGET) $(BUILD_TARGET_SUB)),)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync # L4 has trouble with -pedantic. It also make trouble when inlining is not enabled.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync SUPR3_TEMPLATE = VBOXR3NP
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync SUPR3_TEMPLATE = VBOXR3
37e7010b28a4667800196960b59cd63b5434b7d7vboxsyncSUPR3_DEFS = \
37e7010b28a4667800196960b59cd63b5434b7d7vboxsync IN_SUP_R3 IN_RT_R3 \
37e7010b28a4667800196960b59cd63b5434b7d7vboxsync $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC) \
37e7010b28a4667800196960b59cd63b5434b7d7vboxsync $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
37e7010b28a4667800196960b59cd63b5434b7d7vboxsyncSUPR3_INCS := $(PATH_SUB_CURRENT)
400d70dc1edb0f6d2a9d3a860b1b43f0b2cdfb39vboxsyncSUPR3_SOURCES = \
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# The static part of the hardened support library (ring-3).
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR3HardenedStatic_TEMPLATE = VBOXR3HARDENEDLIB
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR3HardenedStatic_DEFS = IN_SUP_HARDENED_R3
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR3HardenedStatic_DEFS += \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(if $(VBOX_WITH_SUPSVC),VBOX_WITH_SUPSVC,) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(if $(VBOX_WITH_MAIN),VBOX_WITH_MAIN,)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR3HardenedStatic_INCS = .
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR3HardenedStatic_SOURCES = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifndef VBOX_ONLY_DOCS
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync# VBoxSupSvc - The system wide service/daemon.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxSupSvc_TEMPLATE = VBOXR3EXE
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxSupSvc_SOURCES = \
ce5210fe822f74de78c3dddc74f32a2cabcee5fdvboxsync $(KBUILD_TARGET)/SUPSvc-$(KBUILD_TARGET).cpp
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncif1of ($(KBUILD_TARGET), win)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync VBoxSupSvc_SOURCES += \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifn1of ($(KBUILD_TARGET), win)
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync VBoxSupSvc_SOURCES += \
77cce7691847be5aef145f31ba3f9d66fc2cf594vboxsyncVBoxSupSvc_LIBS = \
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync $(LIB_RUNTIME)
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync# SUPR0 - The Ring-0 Import / Thunk library.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR0_TEMPLATE = VBOXR0
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifeq ($(VBOX_LDR_FMT),pe)
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync SUPR0_SOURCES += SUPR0.def
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifeq ($(VBOX_LDR_FMT),lx)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPR0_SOURCES += $$(PATH_SUPR0)/SUPR0.def
9e293277b378073ce86910209a246b744b4caa2cvboxsync$$(PATH_SUPR0)/SUPR0.def: $(PATH_SUB_CURRENT)/SUPR0.def | $$(dir $$@)
9e293277b378073ce86910209a246b744b4caa2cvboxsync -e 's/^[ \t][ \t]*\([gA-Z]\)/ _\1/' \
9e293277b378073ce86910209a246b744b4caa2cvboxsync -e 's/[ \t]DATA[ \t]*/ /' \
9e293277b378073ce86910209a246b744b4caa2cvboxsync --output $@.tmp\
aabfd650b7e36e2c25a6d48b2a2bfd95fe93b65avboxsync $(MV) -f $@.tmp $@
bdd15592ca3578b623ff588055a561f58b7e5586vboxsync# SUPR0IdcClient - The Ring-0 IDC client driver library.
9e293277b378073ce86910209a246b744b4caa2cvboxsyncSUPR0IdcClient_TEMPLATE = VBOXR0DRV
7f5e9cb0292dcce87c0a6794c775c14fb9c2a1e7vboxsyncSUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0 IN_SUP_STATIC
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncSUPR0IdcClient_SDKS.win = W2K3DDK WINPSDKINCS
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncSUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncSUPR0IdcClient_SOURCES = \
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync# VBoxDrv.sys - The Windows driver.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync## @todo consoliate all the targets into a single mess.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifeq ($(KBUILD_TARGET),win)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifdef VBOX_SIGNING_MODE
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync VBoxDrv_NOINST = true
f350b7cf96f1e2f3b0cfd34cfe8726c754f43584vboxsyncVBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER
551d9b8ee3568ad3e11b65ce6ef2867c36375f37vboxsyncifdef VBOX_WITHOUT_NATIVE_R0_LOADER
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync VBoxDrv_DEFS.amd64 = RT_WITH_W64_UNWIND_HACK VBOX_WITHOUT_NATIVE_R0_LOADER
b8908d384db2324f04a2f68a13e67ea32ebf609avboxsyncifdef VBOX_WITH_VMMR0_DISABLE_PREEMPTION
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncVBoxDrv_DEFS += VBOX_WITH_VMMR0_DISABLE_PREEMPTION
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_SDKS = W2K3DDK WINPSDKINCS
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncVBoxDrv_INCS := $(PATH_SUB_CURRENT)
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncVBoxDrv_SOURCES = \
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncVBoxDrv_LDFLAGS.x86 = -Entry:DriverEntry@8
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_LDFLAGS.amd64 = -Entry:DriverEntry
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncVBoxDrv_LIBS = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncINSTALLS += VBoxDrv-inf
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv-inf_INST = $(INST_BIN)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv-inf_MODE = a+r,u+w
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv-inf_SOURCES = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(call DIRDEP,$$(@D))
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(call MSG_GENERATE,VBoxDrv-inf,$@,$<)
39592d8ff3243f6116c4e99be391bcf30a4ad187vboxsync $(call VBOX_EDIT_INF_FN,$<,$@)
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsync ifdef VBOX_SIGNING_MODE
3ca89d9d8c4fc158ba28bdf82c9cc3697625ce12vboxsyncVBoxDrv-inf_SOURCES += \
20fc4a350a4a8e56ffaac6cf57dcd677a7ac36c5vboxsync$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(TARGET_VBoxDrv) | $$(call DIRDEP,$$(@D))
20fc4a350a4a8e56ffaac6cf57dcd677a7ac36c5vboxsync $(INSTALL) -m 644 $< $(@D)
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(call MSG_TOOL,Inf2Cat,VBoxDrv-inf,$@,$<)
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(call VBOX_MAKE_CAT_FN, $(@D),$@)
678e65f634668c9f9a0f45094277cd6b375484cavboxsync endif # signing
678e65f634668c9f9a0f45094277cd6b375484cavboxsync# vboxdrv.ko - The Linux Kernel Module (syntax check only).
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncifeq ($(KBUILD_TARGET),linux)
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncvboxdrv_NOINST = true
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncvboxdrv_DEFS = KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE IN_RT_R0 IN_SUP_R0 CONFIG_VBOXDRV_AS_MISC
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncifdef VBOX_LINUX_VERSION_2_4
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncvboxdrv_DEFS += EXPORT_SYMTAB
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncvboxdrv_INCS := \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(PATH_SUB_CURRENT) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_LIBS.debug = $(vboxdrv_LIBS) $(VBOX_GCC_LIBGCC)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_SOURCES = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifndef VBOX_LINUX_VERSION_2_4
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_SOURCES += \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).mod.c
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Targets for installing the linux sources.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_INST = bin/src/vboxdrv/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_MODE = a+r,u+w
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_SOURCES = $(subst ",,$(FILES_VBOXDRV_NOBIN)) #"
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_SOURCES += \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(if $(VBOX_OSE),,\
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-mod)/dkms.conf) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-mod)/Makefile
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_CLEAN = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-mod)/dkms.conf \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-mod)/Makefile
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-sh_INST = bin/src/vboxdrv
c77e7bff89c7639353778366984d51ff165ea0e3vboxsyncvboxdrv-sh_MODE = a+rx,u+w
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-sh_SOURCES = $(subst ",,$(FILES_VBOXDRV_BIN)) #"
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-sh_SOURCES += \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-sh)/build_in_tmp \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(if $(VBOX_OSE),,\
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-sh_CLEAN = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_TARGET)/vboxdrv-sh-1.dep \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-sh)/build_in_tmp
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Scripts needed for building the kernel modules
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync$$(PATH_vboxdrv-sh)/build_in_tmp: \
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(VBOX_VERSION_STAMP) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync | $$(dir $$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(call MSG_TOOL,Creating,,$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxdrv;g" --output $@ $<
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)chmod 0755 $@
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync$$(PATH_vboxdrv-mod)/dkms.conf: \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(PATH_SUB_CURRENT)/linux/dkms.conf \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(VBOX_VERSION_STAMP) \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync | $$(dir $$@)
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(call MSG_TOOL,Creating,,$@)
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncincludedep $(PATH_TARGET)/vboxdrv-sh-1.dep
678e65f634668c9f9a0f45094277cd6b375484cavboxsync$$(PATH_vboxdrv-mod)/Makefile: \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $(PATH_SUB_CURRENT)/linux/Makefile \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync $$(if $$(eq $$(Support/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
678e65f634668c9f9a0f45094277cd6b375484cavboxsync | $$(dir $$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(call MSG_TOOL,Creating,,$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync ifndef VBOX_WITH_HARDENING
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(CP) -f $< $@
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/vboxdrv-sh-1.dep
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync %$(QUIET2)$(APPEND) '$(PATH_TARGET)/vboxdrv-sh-1.dep' 'Support/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncendif # real linux
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# VBoxDrv.kext - The Darwin Kernel Extension.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifeq ($(KBUILD_TARGET),darwin)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# The Tiger variant.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSYSMODS.x86 += VBoxDrvTiger
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_TEMPLATE = VBOXR0DRV
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_INST = $(INST_VBOXDRV_TIGER)Contents/MacOS/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_DEFS := IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_DEFS.debug += DEBUG_DARWIN_GIP
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_INCS = .
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync#VBoxDrvTiger_LDFLAGS = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger_SOURCES = \
f5eadb22976c1f9813300e4042b8255cfaef7e19vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).cpp
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsyncVBoxDrvTiger.kext_INST = $(INST_VBOXDRV_TIGER)Contents/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger.kext_SOURCES = $(PATH_VBoxDrvTiger.kext)/Info.plist
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrvTiger.kext_CLEAN = $(PATH_VBoxDrvTiger.kext)/Info.plist
f14d3c62ebf4ccb64bd11528e5c4ec60b4528a1avboxsync$$(PATH_VBoxDrvTiger.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info-Tiger.plist $(VBOX_VERSION_MK) | $$(dir $$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(call MSG_GENERATE,VBoxDrvTiger,$@,$<)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(RM) -f $@
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(SED) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync --output $@ \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# The Leopard variant.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSYSMODS += VBoxDrv
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_EXTENDS = VBoxDrvTiger
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_EXTENDS_BY = appending
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV$(if-expr "$(KBUILD_TARGET_ARCH)" == "x86",OSX105,)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_INST = $(INST_VBOXDRV)Contents/MacOS/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_DEFS = VBOX_WITH_HOST_VMX
9fbcdff887bd2d679720a8a50f5601df57b32b1bvboxsyncVBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv.kext_SOURCES = $(PATH_VBoxDrv.kext)/Info.plist
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv.kext_CLEAN = $(PATH_VBoxDrv.kext)/Info.plist
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_SUB_CURRENT)/darwin/Info.plist \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(VBOX_VERSION_MK) | $$(dir $$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(call MSG_GENERATE,VBoxDrv,$@,$<)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(RM) -f $@
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(SED) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync --output $@ \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Common manual loader script.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncINSTALLS += Scripts
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncScripts_INST = $(INST_DIST)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncScripts_SOURCES = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncendif # darwin
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifeq ($(KBUILD_TARGET),os2)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# VBoxDrv.sys - The OS/2 driver.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrv_INCS := $(PATH_SUB_CURRENT)
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync#VBoxDrv_LDFLAGS = -s -t -v
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrv_SOURCES = \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrv_LIBS = \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync $(TARGET_VBoxDrvLib) \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync $(VBOX_GCC_LIBGCC) \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync# temp hack to ensure that SUPDrvA-os2.asm is first in the link.
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncLIBRARIES += VBoxDrvLib
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrvLib_TEMPLATE = VBOXR0DRV
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrvLib_NOINST = 1
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrvLib_INCS := \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncVBoxDrvLib_SOURCES = \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncifeq ($(KBUILD_TARGET),freebsd)
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync# vboxdrv.ko - The FreeBSD Kernel Module.
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncvboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER VBOX_SVN_REV=$(VBOX_SVN_REV)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_INCS := $(PATH_SUB_CURRENT)
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncvboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsyncvboxdrv_SOURCES := \
404c008ee2f58e85158a7c1c3f8974bdf52221e3vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).def \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync## @todo the SUPDrv-freebsd.def is most probably gonna break it and require build system hacking...
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# Targets for installing the freebsd sources.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_INST = bin/src/vboxdrv/
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_MODE = a+r,u+w
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_SOURCES = $(subst ",,$(FILES_VBOXDRV_NOBIN)) #"
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_SOURCES += \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-mod)/Makefile
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv-mod_CLEAN = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_vboxdrv-mod)/Makefile
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync$$(PATH_vboxdrv-mod)/Makefile: \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(PATH_SUB_CURRENT)/freebsd/Makefile \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $$(if $$(eq $$(Support/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync | $$(dir $$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(call MSG_TOOL,Creating,,$@)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync ifndef VBOX_WITH_HARDENING
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(QUIET)$(CP) -f $< $@
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncendif # freebsd
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifeq ($(KBUILD_TARGET),solaris)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# vboxdrv.o - The Solaris Kernel Module.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_DEFS = IN_RT_R0 IN_SUP_R0 SUPDRV_WITH_RELEASE_LOGGER
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncifdef VBOX_WITH_NETFLT
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync vboxdrv_DEFS += VBOX_WITH_NETFLT
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_DEPS += $(VBOX_SVN_REV_KMK)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_INCS := $(PATH_SUB_CURRENT)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncvboxdrv_SOURCES = \
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
678e65f634668c9f9a0f45094277cd6b375484cavboxsyncendif # solaris
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsync# SUPDrv.c needs the VBOX_SVN_REV.
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncSUPDrv.c_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncendif # !VBOX_ONLY_DOCS
1c2c968fd241148110002d75b2c0fdeddc211e14vboxsyncinclude $(KBUILD_PATH)/subfooter.kmk