# $Id: Makefile.kmk 62508 2016-07-22 19:10:00Z vboxsync $ ## @file # Makefile for the device and driver samples. # # # Copyright (C) 2009-2016 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. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk # # VBoxSampleDevice - A sample device module. # DLLS += VBoxSampleDevice VBoxSampleDevice_TEMPLATE = VBOXR3 VBoxSampleDevice_INSTTYPE = none VBoxSampleDevice_SOURCES = \ VBoxSampleDevice.cpp VBoxSampleDevice_LIBS = \ $(LIB_RUNTIME) \ $(LIB_VMM) \ $(LIB_REM) # # VBoxSampleDriver - A sample driver module. # DLLS += VBoxSampleDriver VBoxSampleDriver_TEMPLATE = VBOXR3 VBoxSampleDriver_INSTTYPE = none VBoxSampleDriver_SOURCES = \ DrvStorageFilter.cpp VBoxSampleDriver_LIBS = \ $(LIB_RUNTIME) \ $(LIB_VMM) \ $(LIB_REM) include $(FILE_KBUILD_SUB_FOOTER) # # Installs the filter. # install-filter: $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,)) $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,)) # Make VBox load the driver $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" \ "$(if $(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_TARGET))" # Configure the matching. $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" \ "VD" # The config of the injected driver. $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Driver" \ "StorageFilter" $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported" \ "1" uninstall-filter: $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,)) $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,)) $(VBOX_MANAGE) showvminfo "$(VBOX_VMNAME)" $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported"