1 | # $Id: Makefile.kmk 69067 2017-10-13 08:41:13Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the device and driver samples.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-2017 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_SOURCES = \
|
---|
28 | VBoxSampleDevice.cpp
|
---|
29 | VBoxSampleDevice_LIBS = \
|
---|
30 | $(LIB_RUNTIME) \
|
---|
31 | $(LIB_VMM)
|
---|
32 |
|
---|
33 | #
|
---|
34 | # VBoxSampleDriver - A sample driver module.
|
---|
35 | #
|
---|
36 | DLLS += VBoxSampleDriver
|
---|
37 | VBoxSampleDriver_TEMPLATE = VBOXR3
|
---|
38 | VBoxSampleDriver_SOURCES = \
|
---|
39 | DrvStorageFilter.cpp
|
---|
40 | VBoxSampleDriver_LIBS = \
|
---|
41 | $(LIB_RUNTIME) \
|
---|
42 | $(LIB_VMM)
|
---|
43 |
|
---|
44 |
|
---|
45 | #
|
---|
46 | # VBoxPlaygroundDevice - A device module demonstrating some unusual features.
|
---|
47 | #
|
---|
48 | DLLS += VBoxPlaygroundDevice
|
---|
49 | VBoxPlaygroundDevice_TEMPLATE = VBOXR3
|
---|
50 | VBoxPlaygroundDevice_SOURCES = \
|
---|
51 | DevPlayground.cpp
|
---|
52 | VBoxPlaygroundDevice_LIBS = \
|
---|
53 | $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
|
---|
54 | $(LIB_RUNTIME) \
|
---|
55 | $(LIB_VMM)
|
---|
56 |
|
---|
57 | ifdef VBOX_WITH_XPCOM
|
---|
58 | ## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM.
|
---|
59 | VBoxPlaygroundDevice_DEFS += VBOX_WITH_XPCOM
|
---|
60 | ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
61 | VBoxPlaygroundDevice_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
|
---|
62 | endif
|
---|
63 | VBoxPlaygroundDevice_INCS += \
|
---|
64 | $(VBOX_XPCOM_INCS)
|
---|
65 | VBoxPlaygroundDevice_INTERMEDIATES += \
|
---|
66 | $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
|
---|
67 | VBoxPlaygroundDevice_LIBS += \
|
---|
68 | $(LIB_XPCOM)
|
---|
69 | else # COM
|
---|
70 | VBoxPlaygroundDevice_INCS += \
|
---|
71 | $(VBOX_PATH_SDK)/bindings/mscom/include
|
---|
72 | VBoxPlaygroundDevice_INTERMEDIATES += \
|
---|
73 | $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
|
---|
74 | endif # COM
|
---|
75 |
|
---|
76 |
|
---|
77 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
78 |
|
---|
79 |
|
---|
80 | #
|
---|
81 | # Installs the filter.
|
---|
82 | #
|
---|
83 | install-filter:
|
---|
84 | $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
|
---|
85 | $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
|
---|
86 | # Make VBox load the driver
|
---|
87 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" \
|
---|
88 | "$(if $(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_TARGET))"
|
---|
89 | # Configure the matching.
|
---|
90 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" \
|
---|
91 | "VD"
|
---|
92 | # The config of the injected driver.
|
---|
93 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Driver" \
|
---|
94 | "StorageFilter"
|
---|
95 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported" \
|
---|
96 | "1"
|
---|
97 |
|
---|
98 | uninstall-filter:
|
---|
99 | $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
|
---|
100 | $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
|
---|
101 | $(VBOX_MANAGE) showvminfo "$(VBOX_VMNAME)"
|
---|
102 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path"
|
---|
103 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver"
|
---|
104 | $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported"
|
---|
105 |
|
---|