1 | # $Id: Makefile.kmk 63884 2016-09-19 12:21:00Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the device and driver samples.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-2016 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 |
|
---|
22 | #
|
---|
23 | # VBoxSampleDevice - A sample device module.
|
---|
24 | #
|
---|
25 | DLLS += VBoxSampleDevice
|
---|
26 | VBoxSampleDevice_TEMPLATE = VBOXR3
|
---|
27 | VBoxSampleDevice_INSTTYPE = none
|
---|
28 | VBoxSampleDevice_SOURCES = \
|
---|
29 | VBoxSampleDevice.cpp \
|
---|
30 | DevPlayground.cpp
|
---|
31 | VBoxSampleDevice_LIBS = \
|
---|
32 | $(LIB_RUNTIME) \
|
---|
33 | $(LIB_VMM) \
|
---|
34 | $(LIB_REM)
|
---|
35 |
|
---|
36 | #
|
---|
37 | # VBoxSampleDriver - A sample driver module.
|
---|
38 | #
|
---|
39 | DLLS += VBoxSampleDriver
|
---|
40 | VBoxSampleDriver_TEMPLATE = VBOXR3
|
---|
41 | VBoxSampleDriver_INSTTYPE = none
|
---|
42 | VBoxSampleDriver_SOURCES = \
|
---|
43 | DrvStorageFilter.cpp
|
---|
44 | VBoxSampleDriver_LIBS = \
|
---|
45 | $(LIB_RUNTIME) \
|
---|
46 | $(LIB_VMM) \
|
---|
47 | $(LIB_REM)
|
---|
48 |
|
---|
49 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
50 |
|
---|
51 |
|
---|
52 | #
|
---|
53 | # Installs the filter.
|
---|
54 | #
|
---|
55 | install-filter:
|
---|
56 | $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
|
---|
57 | $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
|
---|
58 | # Make VBox load the driver
|
---|
59 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" \
|
---|
60 | "$(if $(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_TARGET))"
|
---|
61 | # Configure the matching.
|
---|
62 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" \
|
---|
63 | "VD"
|
---|
64 | # The config of the injected driver.
|
---|
65 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Driver" \
|
---|
66 | "StorageFilter"
|
---|
67 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported" \
|
---|
68 | "1"
|
---|
69 |
|
---|
70 | uninstall-filter:
|
---|
71 | $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
|
---|
72 | $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
|
---|
73 | $(VBOX_MANAGE) showvminfo "$(VBOX_VMNAME)"
|
---|
74 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path"
|
---|
75 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver"
|
---|
76 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported"
|
---|
77 |
|
---|