Makefile.kmk revision 505c3dddcf03c6c1e5c9edc0d0c2c6234572e4fa
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# $Id$
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync## @file
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Sub-Makefile for the support library and the drivers/modules/kexts it uses.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
c58f1213e628a545081c70e26c6b67a841cff880vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# available from http://www.virtualbox.org. This file is free software;
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# you can redistribute it and/or modify it under the terms of the GNU
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# General Public License (GPL) as published by the Free Software
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# The contents of this file may alternatively be used under the terms
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# of the Common Development and Distribution License Version 1.0
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# VirtualBox OSE distribution, in which case the provisions of the
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# CDDL are applicable instead of those of the GPL.
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync#
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# You may elect to license modified versions of this file under the
0d12c7f9423f2745f8e282523d0930f91bff03b3vboxsync# terms and conditions of either the GPL or the CDDL or both.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# additional information or have any questions.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
032a52c5b2984e26e84c2961f8f7f98a3954c8f2vboxsyncifdef VBOX_KBUILD_HACKING
6ba706e9f431401d425d16817fdcd6316f83b584vboxsyncSUB_DEPTH = ../../../..
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncelse
590bfe12ce22cd3716448fbb9f4dc51664bfe5e2vboxsyncSUB_DEPTH = ..
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncDEPTH ?= ../../../..
45c3e41d012100c5f4a3f77e391e4c6da8f5b97avboxsyncendif
45c3e41d012100c5f4a3f77e391e4c6da8f5b97avboxsyncinclude $(KBUILD_PATH)/subheader.kmk
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# Targets
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncLIBRARIES += SUPR3
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncifeq ($(filter-out pe lx,$(VBOX_LDR_FMT)),)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncLIBRARIES += SUPR0
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncendif
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncifdef VBOX_WITH_VBOXDRV
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncLIBRARIES += SUPR0IdcClient
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSYSMODS.darwin += VBoxDrv
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSYSMODS.freebsd += vboxdrv
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSYSMODS.linux += vboxdrv
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsyncSYSMODS.win += VBoxDrv
9939c713bffcfc4305d99d994552aa2ad9bce097vboxsyncSYSMODS.os2 += VBoxDrv
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsyncSYSMODS.solaris += vboxdrv
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncOTHERS.linux += \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_BIN)/src/build_in_tmp \
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync $(if $(VBOX_OSE),,$(PATH_BIN)/src/dkms.conf)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncendif
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsyncINSTALLS.linux += vboxmod-bin vboxmod-sh
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync#
c2046db2cc346cc299f0cd9b2d1e160179159cfcvboxsync# Include sub-makefile(s).
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsyncinclude $(PATH_SUB_CURRENT)/testcase/Makefile.kmk
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
2d8870843ff566fee9bd3a6a5942414254106479vboxsync#
2d8870843ff566fee9bd3a6a5942414254106479vboxsync# Populate FILES_VBOXDRV_NOBIN and FILES_VBOXDRV_BIN
2d8870843ff566fee9bd3a6a5942414254106479vboxsync#
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncinclude $(PATH_SUB_CURRENT)/linux/files_vboxdrv
2d8870843ff566fee9bd3a6a5942414254106479vboxsync
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncvboxmod-bin_INST = bin/src/
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncvboxmod-bin_MODE = a+r,u+w
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncvboxmod-bin_SOURCES = $(subst ",,$(FILES_VBOXDRV_NOBIN)) #"
2d8870843ff566fee9bd3a6a5942414254106479vboxsync
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncvboxmod-sh_INST = bin/src/
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncvboxmod-sh_MODE = a+rx,u+w
2d8870843ff566fee9bd3a6a5942414254106479vboxsyncvboxmod-sh_SOURCES = $(subst ",,$(FILES_VBOXDRV_BIN)) #"
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync# Scripts needed for building the kernel modules
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync$(PATH_BIN)/src/build_in_tmp: \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(PATH_SUB_CURRENT)/linux/build_in_tmp \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(VBOX_VERSION_STAMP)
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(call MSG_TOOL,Creating,,$@)
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxdrv;g" < $< > $@
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(QUIET)chmod 0755 $@
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync$(PATH_BIN)/src/dkms.conf: \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(PATH_SUB_CURRENT)/linux/dkms.conf \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(VBOX_VERSION_STAMP)
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(call MSG_TOOL,Creating,,$@)
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsync# The Ring-3 Support Library (this is linked into the IPRT dll, VBoxRT).
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
044af0d1e6474076366759db86f101778c5f20ccvboxsyncifneq ($(filter l4%,$(KBUILD_TARGET) $(BUILD_TARGET_SUB)),)
044af0d1e6474076366759db86f101778c5f20ccvboxsync# L4 has trouble with -pedantic. It also make trouble when inlining is not enabled.
044af0d1e6474076366759db86f101778c5f20ccvboxsyncSUPR3_TEMPLATE = VBOXR3NP
044af0d1e6474076366759db86f101778c5f20ccvboxsyncelse
044af0d1e6474076366759db86f101778c5f20ccvboxsyncSUPR3_TEMPLATE = VBOXR3
044af0d1e6474076366759db86f101778c5f20ccvboxsyncendif
044af0d1e6474076366759db86f101778c5f20ccvboxsyncSUPR3_DEFS = IN_SUP_R3 IN_RT_R3
044af0d1e6474076366759db86f101778c5f20ccvboxsyncifdef VBOX_WITH_IDT_PATCHING
044af0d1e6474076366759db86f101778c5f20ccvboxsyncSUPR3_DEFS += VBOX_WITH_IDT_PATCHING
044af0d1e6474076366759db86f101778c5f20ccvboxsyncendif
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR3_INCS := $(PATH_SUB_CURRENT)
044af0d1e6474076366759db86f101778c5f20ccvboxsyncSUPR3_INCS.l4 = $(L4_INCDIR)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR3_SOURCES = \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync SUPLib.cpp \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(KBUILD_TARGET)/SUPLib-$(KBUILD_TARGET).cpp
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync# SUPR0 - The Ring-0 Import / Thunk library.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync#
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncSUPR0_TEMPLATE = VBOXR0
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncifeq ($(VBOX_LDR_FMT),pe)
044af0d1e6474076366759db86f101778c5f20ccvboxsyncSUPR0_SOURCES += SUPR0.def
044af0d1e6474076366759db86f101778c5f20ccvboxsyncendif
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncifeq ($(VBOX_LDR_FMT),lx)
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncSUPR0_SOURCES += $(PATH_TARGET)/SUPR0.def
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync$(PATH_TARGET)/SUPR0.def: $(PATH_SUB_CURRENT)/SUPR0.def | $(call DIRDEP,$(PATH_TARGET))
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(SED) -e 's/^[ \t][ \t]*\([gA-Z]\)/ _\1/' -e 's/[ \t]DATA[ \t]*/ /' $< > $@.tmp
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(MV) -f $@.tmp $@
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncendif
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync# SUPR0IdcClient - The Ring-0 IDC client driver library.
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync#
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR0IdcClient_TEMPLATE = VBOXR0DRV
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR0IdcClient_DEFS = IN_RT_R0 IN_SUP_R0
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR0IdcClient_SDKS.win = W2K3DDK WINPSDKINCS
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR0IdcClient_SOURCES.$(KBUILD_TARGET) = \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(KBUILD_TARGET)/SUPR0IdcClient-$(KBUILD_TARGET).c
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncSUPR0IdcClient_SOURCES = \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync SUPR0IdcClient.c \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync SUPR0IdcClientComponent.c \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync SUPR0IdcClientStubs.c
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync#
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync# VBoxDrv.sys - The Windows driver.
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync#
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncifeq ($(KBUILD_TARGET),win)
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncifdef VBOX_SIGNING_MODE
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync VBoxDrv_NOINST = true
a1df400bbe9d64aad400442e56eb637019300a5evboxsyncendif
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
a1df400bbe9d64aad400442e56eb637019300a5evboxsyncifdef VBOX_WITH_IDT_PATCHING
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_DEFS += VBOX_WITH_IDT_PATCHING
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncendif
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_SDKS = W2K3DDK WINPSDKINCS
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_INCS := $(PATH_SUB_CURRENT)
a1df400bbe9d64aad400442e56eb637019300a5evboxsyncVBoxDrv_SOURCES = \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync win/SUPDrv-win.cpp \
a1df400bbe9d64aad400442e56eb637019300a5evboxsync win/SUPDrvA-win.asm \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync SUPDrv.c
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_LDFLAGS.x86 = -Entry:DriverEntry@8
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv_LDFLAGS.amd64 = -Entry:DriverEntry
044af0d1e6474076366759db86f101778c5f20ccvboxsyncVBoxDrv_LIBS = \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncINSTALLS += VBoxDrv-inf
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncVBoxDrv-inf_INST = $(INST_BIN)
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv-inf_MODE = a+r,u+w
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv-inf_SOURCES = \
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncVBoxDrv-inf_CLEAN = $(VBoxDrv-inf_SOURCES)
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsyncVBoxDrv-inf_BLDDIRS = $(PATH_TARGET)/VBoxDrvCat.dir
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf: $(PATH_SUB_CURRENT)/win/VBoxDrv.inf $(MAKEFILE_CURRENT) | $$(call DIRDEP,$$(@D))
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(call MSG_GENERATE,VBoxDrv-inf,$@,$<)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(call VBOX_EDIT_INF_FN,$<,$@)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
044af0d1e6474076366759db86f101778c5f20ccvboxsync ifdef VBOX_SIGNING_MODE
044af0d1e6474076366759db86f101778c5f20ccvboxsyncVBoxDrv-inf_SOURCES += \
044af0d1e6474076366759db86f101778c5f20ccvboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat
ca3da10d05961c339b5180fbd40a54587d6bad35vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.sys: $$(TARGET_VBoxDrv) | $$(call DIRDEP,$$(@D))
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(INSTALL) -m 644 $< $(@D)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync$(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat: \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.inf \
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsync $(PATH_TARGET)/VBoxDrvCat.dir/VBoxDrv.cat
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync $(call MSG_TOOL,Inf2Cat,VBoxDrv-inf,$@,$<)
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync $(call VBOX_MAKE_CAT_FN, $(@D),$@)
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync endif # signing
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncendif # win
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync#
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync# vboxdrv.ko - The Linux Kernel Module (syntax only).
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync#
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncifeq ($(KBUILD_TARGET),linux)
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncvboxdrv_DEFS = KBUILD_MODNAME=KBUILD_STR\(vboxdrv\) KBUILD_BASENAME=KBUILD_STR\(vboxdrv\) MODULE IN_RT_R0 IN_SUP_R0 CONFIG_VBOXDRV_AS_MISC
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncifdef VBOX_WITH_IDT_PATCHING
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncvboxdrv_DEFS += VBOX_WITH_IDT_PATCHING
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncendif
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncifndef VBOX_LINUX_VERSION_2_4
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncvboxdrv_DEFS += EXPORT_SYMTAB
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncendif
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncvboxdrv_INCS := \
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync $(PATH_SUB_CURRENT) \
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsync $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
7d80dfbe5d66fc4c6de6fe109ce96a081496dcd4vboxsyncvboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncvboxdrv_LIBS.debug = $(vboxdrv_LIBS) $(VBOX_GCC_LIBGCC)
3a4a6501d0ccd629d9951b644d380c7bb2d46086vboxsyncvboxdrv_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync SUPDrv.c
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifndef VBOX_LINUX_VERSION_2_4
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_SOURCES += \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).mod.c
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif # real linux
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync# VBoxDrv.kext - The Darwin Kernel Extension.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifeq ($(KBUILD_TARGET),darwin)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifdef VBOX_WITH_IDT_PATCHING
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_DEFS += VBOX_WITH_IDT_PATCHING
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_DEFS += DEBUG_DARWIN_GIP
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_INCS := $(PATH_SUB_CURRENT)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_LDFLAGS = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_INST = $(INST_VBOXDRV)Contents/MacOS/
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync SUPDrv.c \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).cpp
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncINSTALLS += VBoxDrv.kext
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv.kext_INST = $(INST_VBOXDRV)Contents/
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv.kext_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_TARGET)/VBoxDrv/Info.plist
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv.kext_CLEAN = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_TARGET)/VBoxDrv/Info.plist
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync$(PATH_TARGET)/VBoxDrv/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET)/VBoxDrv)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(call MSG_GENERATE,VBoxDrv,$@,$<)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(xQUIET)$(RM) -f $@
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(xQUIET)$(SED) \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $< > $@
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncINSTALLS += Scripts
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncScripts_INST = $(INST_DIST)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncScripts_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync darwin/load.sh
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif # darwin
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync# VBoxDrv.sys - The OS/2 driver.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifeq ($(KBUILD_TARGET),os2)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_TEMPLATE = VBOXR0DRV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_DEFS = IN_RT_R0 IN_SUP_R0
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_INCS := $(PATH_SUB_CURRENT)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#VBoxDrv_LDFLAGS = -s -t -v
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync os2/SUPDrvA-os2.asm \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync os2/SUPDrv-os2.def
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrv_LIBS = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(TARGET_VBoxDrvLib) \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(VBOX_GCC_LIBGCC) \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync end
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync# temp hack to ensure that SUPDrvA-os2.asm is first in the link.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncLIBRARIES += VBoxDrvLib
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrvLib_TEMPLATE = VBOXR0DRV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrvLib_NOINST = 1
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrvLib_DEFS = IN_RT_R0 IN_SUP_R0
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrvLib_INCS := \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_SUB_CURRENT) \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_TARGET) \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_ROOT)/src/VBox/Runtime/include
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncVBoxDrvLib_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync os2/SUPDrv-os2.cpp \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync SUPDrv.c
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync# vboxdrv.ko - The FreeBSD Kernel Module.
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifeq ($(KBUILD_TARGET),freebsd)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_DEFS = IN_RT_R0 IN_SUP_R0
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifdef VBOX_WITH_IDT_PATCHING
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_DEFS += VBOX_WITH_IDT_PATCHING
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_INCS := $(PATH_SUB_CURRENT)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_SOURCES := \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(PATH_SUB_CURRENT)/$(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).def \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync SUPDrv.c
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync## @todo the SUPDrv-freebsd.def is most probably gonna break it and require build system hacking...
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif # freebsd
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync#
0109a2240391a89f6556b1545e6cc57f9efab060vboxsync# vboxdrv.o - The Solaris Kernel Module.
0109a2240391a89f6556b1545e6cc57f9efab060vboxsync#
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncifeq ($(KBUILD_TARGET),solaris)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_TEMPLATE = VBOXR0DRV
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_DEFS = IN_RT_R0 IN_SUP_R0
0109a2240391a89f6556b1545e6cc57f9efab060vboxsyncifdef VBOX_WITH_IDT_PATCHING
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_DEFS += VBOX_WITH_IDT_PATCHING
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_INCS := $(PATH_SUB_CURRENT)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_LIBS = $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncvboxdrv_SOURCES = \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync $(KBUILD_TARGET)/SUPDrv-$(KBUILD_TARGET).c \
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync SUPDrv.c
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncendif # solaris
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsyncinclude $(KBUILD_PATH)/subfooter.kmk
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync
b7a07b07543924f45c1fffd2f90de582038b8ba6vboxsync