VirtualBox

source: vbox/trunk/src/VBox/Devices/Samples/Makefile.kmk@ 98410

Last change on this file since 98410 was 98410, checked in by vboxsync, 17 months ago

Devices/*.kmk: Automatic scm cleanups. bugref:10348

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
RevLine 
[22985]1# $Id: Makefile.kmk 98410 2023-02-01 16:20:10Z vboxsync $
2## @file
3# Makefile for the device and driver samples.
4#
5
6#
[98103]7# Copyright (C) 2009-2023 Oracle and/or its affiliates.
[22985]8#
[96407]9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
[22985]11#
[96407]12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
[22985]27
28SUB_DEPTH = ../../../..
29include $(KBUILD_PATH)/subheader.kmk
30
31
32#
[39857]33# VBoxSampleDevice - A sample device module.
[22985]34#
35DLLS += VBoxSampleDevice
[98133]36VBoxSampleDevice_TEMPLATE = VBoxR3Dll
[22985]37VBoxSampleDevice_SOURCES = \
[69067]38 VBoxSampleDevice.cpp
[22985]39VBoxSampleDevice_LIBS = \
[93450]40 $(LIB_RUNTIME)
[22985]41
[39857]42#
43# VBoxSampleDriver - A sample driver module.
44#
45DLLS += VBoxSampleDriver
[98133]46VBoxSampleDriver_TEMPLATE = VBoxR3Dll
[39857]47VBoxSampleDriver_SOURCES = \
48 DrvStorageFilter.cpp
49VBoxSampleDriver_LIBS = \
[93450]50 $(LIB_RUNTIME)
[39857]51
[69067]52
53#
54# VBoxPlaygroundDevice - A device module demonstrating some unusual features.
55#
56DLLS += VBoxPlaygroundDevice
[98133]57VBoxPlaygroundDevice_TEMPLATE = VBoxR3Dll
[69067]58VBoxPlaygroundDevice_SOURCES = \
59 DevPlayground.cpp
60VBoxPlaygroundDevice_LIBS = \
61 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
[93450]62 $(LIB_RUNTIME)
[69067]63
64ifdef VBOX_WITH_XPCOM
65 ## @todo may be worth creating the VBOX_XPCOM SDK def, or just a SDK_VBOXXPCOM.
66 VBoxPlaygroundDevice_DEFS += VBOX_WITH_XPCOM
67 ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
68 VBoxPlaygroundDevice_DEFS += VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
69 endif
70 VBoxPlaygroundDevice_INCS += \
[98410]71 $(VBOX_XPCOM_INCS)
[69067]72 VBoxPlaygroundDevice_INTERMEDIATES += \
[98410]73 $(VBOX_PATH_SDK)/bindings/xpcom/include/VirtualBox_XPCOM.h
[69067]74 VBoxPlaygroundDevice_LIBS += \
[98410]75 $(LIB_XPCOM)
[69067]76else # COM
77 VBoxPlaygroundDevice_INCS += \
[98410]78 $(VBOX_PATH_SDK)/bindings/mscom/include
[69067]79 VBoxPlaygroundDevice_INTERMEDIATES += \
[98410]80 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
[69067]81endif # COM
82
83
[41477]84include $(FILE_KBUILD_SUB_FOOTER)
[22985]85
[39857]86
87#
88# Installs the filter.
89#
90install-filter:
91 $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
92 $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
93# Make VBox load the driver
94 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path" \
95 "$(if $(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_INST_TARGET),$(VBoxSampleDriver_1_TARGET))"
96# Configure the matching.
97 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver" \
98 "VD"
99# The config of the injected driver.
100 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Driver" \
101 "StorageFilter"
102 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported" \
103 "1"
104
105uninstall-filter:
106 $(if-expr "$(VBOX_MANAGE)" == "",$(error VBOX_MANAGE is not defined,))
107 $(if-expr "$(VBOX_VMNAME)" == "",$(error VBOX_VMNAME is not defined,))
108 $(VBOX_MANAGE) showvminfo "$(VBOX_VMNAME)"
109 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/Drivers/VBoxSampleDriver/Path"
110 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AboveDriver"
111 $(VBOX_MANAGE) setextradata "$(VBOX_VMNAME)" "VBoxInternal/PDM/DriverTransformations/StorageFilter/AttachedDriver/Config/AsyncIOSupported"
112
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use