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