VirtualBox

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

Last change on this file since 86405 was 82968, checked in by vboxsync, 5 years ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1# $Id: Makefile.kmk 82968 2020-02-04 10:35:17Z vboxsync $
2## @file
3# Makefile for the device and driver samples.
4#
5
6#
7# Copyright (C) 2009-2020 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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21
22#
23# VBoxSampleDevice - A sample device module.
24#
25DLLS += VBoxSampleDevice
26VBoxSampleDevice_TEMPLATE = VBOXR3
27VBoxSampleDevice_SOURCES = \
28 VBoxSampleDevice.cpp
29VBoxSampleDevice_LIBS = \
30 $(LIB_RUNTIME) \
31 $(LIB_VMM)
32
33#
34# VBoxSampleDriver - A sample driver module.
35#
36DLLS += VBoxSampleDriver
37VBoxSampleDriver_TEMPLATE = VBOXR3
38VBoxSampleDriver_SOURCES = \
39 DrvStorageFilter.cpp
40VBoxSampleDriver_LIBS = \
41 $(LIB_RUNTIME) \
42 $(LIB_VMM)
43
44
45#
46# VBoxPlaygroundDevice - A device module demonstrating some unusual features.
47#
48DLLS += VBoxPlaygroundDevice
49VBoxPlaygroundDevice_TEMPLATE = VBOXR3
50VBoxPlaygroundDevice_SOURCES = \
51 DevPlayground.cpp
52VBoxPlaygroundDevice_LIBS = \
53 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
54 $(LIB_RUNTIME) \
55 $(LIB_VMM)
56
57ifdef 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)
69else # COM
70 VBoxPlaygroundDevice_INCS += \
71 $(VBOX_PATH_SDK)/bindings/mscom/include
72 VBoxPlaygroundDevice_INTERMEDIATES += \
73 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
74endif # COM
75
76
77include $(FILE_KBUILD_SUB_FOOTER)
78
79
80#
81# Installs the filter.
82#
83install-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
98uninstall-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
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette