VirtualBox

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

Last change on this file since 94567 was 93450, checked in by vboxsync, 3 years ago

Devices: Drop linking with LIB_VMM and LIB_REM linking. bugref:10074

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
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
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
32#
33# VBoxSampleDriver - A sample driver module.
34#
35DLLS += VBoxSampleDriver
36VBoxSampleDriver_TEMPLATE = VBOXR3
37VBoxSampleDriver_SOURCES = \
38 DrvStorageFilter.cpp
39VBoxSampleDriver_LIBS = \
40 $(LIB_RUNTIME)
41
42
43#
44# VBoxPlaygroundDevice - A device module demonstrating some unusual features.
45#
46DLLS += VBoxPlaygroundDevice
47VBoxPlaygroundDevice_TEMPLATE = VBOXR3
48VBoxPlaygroundDevice_SOURCES = \
49 DevPlayground.cpp
50VBoxPlaygroundDevice_LIBS = \
51 $(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
52 $(LIB_RUNTIME)
53
54ifdef 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)
66else # COM
67 VBoxPlaygroundDevice_INCS += \
68 $(VBOX_PATH_SDK)/bindings/mscom/include
69 VBoxPlaygroundDevice_INTERMEDIATES += \
70 $(VBOX_PATH_SDK)/bindings/mscom/include/VirtualBox.h
71endif # COM
72
73
74include $(FILE_KBUILD_SUB_FOOTER)
75
76
77#
78# Installs the filter.
79#
80install-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
95uninstall-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
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