VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxUSB/win/Makefile.kmk@ 82968

Last change on this file since 82968 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: 6.2 KB
Line 
1# $Id: Makefile.kmk 82968 2020-02-04 10:35:17Z vboxsync $
2## @file
3# Sub-Makefile for the Windows USB drivers.
4#
5
6#
7# Copyright (C) 2006-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# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26
27SUB_DEPTH = ../../../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30LIBRARIES.win += usbd
31SYSMODS.win += VBoxUSB VBoxUSBMon
32PROGRAMS.win += USBInstall USBUninstall USBTest
33INSTALLS.win += install-infs
34
35#
36# usbd
37#
38usbd_TEMPLATE = VBOXR0DRV
39usbd_SOURCES = usbd/usbd.def
40
41#
42# VBoxUSB
43#
44VBoxUSB_TEMPLATE = VBOXR0DRV
45ifdef VBOX_SIGNING_MODE
46 VBoxUSB_INSTTYPE = none
47 VBoxUSB_DEBUG_INSTTYPE = both
48endif
49VBoxUSB_SDKS = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
50VBoxUSB_DEFS = IN_RT_R0 IN_SUP_R0 VBOX_DBG_LOG_NAME=\"USBDev\"
51VBoxUSB_LDFLAGS.x86 = -Entry:DriverEntry@8
52VBoxUSB_LDFLAGS.amd64 = -Entry:DriverEntry
53VBoxUSB_SOURCES = \
54 dev/VBoxUsbDev.cpp \
55 dev/VBoxUsbRt.cpp \
56 dev/VBoxUsbPnP.cpp \
57 dev/VBoxUsbPwr.cpp \
58 cmn/VBoxUsbTool.cpp \
59 cmn/VBoxDrvTool.cpp \
60 dev/VBoxUsbDev.rc
61VBoxUSB_LIBS = \
62 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
63 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib \
64 $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
65 $(usbd_1_TARGET)
66
67#
68# VBoxUSBMon
69#
70VBoxUSBMon_TEMPLATE = VBOXR0DRV
71ifdef VBOX_SIGNING_MODE
72 VBoxUSBMon_INSTTYPE = none
73 VBoxUSBMon_DEBUG_INSTTYPE = both
74endif
75VBoxUSBMon_INCS := $(PATH_SUB_CURRENT)/..
76VBoxUSBMon_SDKS = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK)INCS
77VBoxUSBMon_DEFS = IN_RT_R0 IN_SUP_R0 NTDDI_WINNT=_NTDDI_VISTA \
78 VBOXUSBFILTERMGR_USB_SPINLOCK VBOX_DBG_LOG_NAME=\"USBMon\"
79VBoxUSBMon_LDFLAGS.x86 = -Entry:DriverEntry@8
80VBoxUSBMon_LDFLAGS.amd64 = -Entry:DriverEntry
81ifdef VBOX_USBMON_WITH_FILTER_AUTOAPPLY
82 VBoxUSBMon_DEFS += VBOX_USBMON_WITH_FILTER_AUTOAPPLY
83endif
84VBoxUSBMon_SOURCES = \
85 mon/VBoxUsbMon.cpp \
86 mon/VBoxUsbFlt.cpp \
87 mon/VBoxUsbHook.cpp \
88 cmn/VBoxUsbTool.cpp \
89 cmn/VBoxDrvTool.cpp \
90 ../USBFilter.cpp \
91 ../VBoxUSBFilterMgr.cpp \
92 mon/VBoxUsbMon.rc
93VBoxUSBMon_LIBS = \
94 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
95 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib \
96 $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB) \
97 $(usbd_1_TARGET)
98if1of ($(KBUILD_TYPE), debug)
99VBoxUSBMon_DEFS += LOG_ENABLED VBOX_USB_WITH_VERBOSE_LOGGING
100endif
101
102#
103# USBInstall
104#
105USBInstall_TEMPLATE = VBOXR3EXE
106USBInstall_DEFS = IN_RT_R3
107USBInstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
108USBInstall_CXXFLAGS = -Gz
109USBInstall_CFLAGS = -Gz
110USBInstall_SOURCES = \
111 Install/USBInstall.cpp
112USBInstall_LIBS = \
113 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/newdev.lib \
114 $(LIB_RUNTIME) \
115 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB) \
116 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB)
117
118
119#
120# USBUninstall
121#
122USBUninstall_TEMPLATE = VBOXR3EXE
123USBUninstall_DEFS = IN_RT_R3
124USBUninstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
125USBUninstall_CXXFLAGS = -Gz
126USBUninstall_CFLAGS = -Gz
127USBUninstall_SOURCES = \
128 Install/USBUninstall.cpp
129USBUninstall_LIBS = \
130 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/newdev.lib \
131 $(LIB_RUNTIME) \
132 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB) \
133 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB)
134
135#
136# USBTest
137#
138USBTest_TEMPLATE = VBOXR3EXE
139USBTest_DEFS = IN_RT_R3 IN_USBLIB
140USBTest_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
141USBTest_CXXFLAGS = -Gz
142USBTest_CFLAGS = -Gz
143USBTest_SOURCES = \
144 testcase/USBTest.cpp \
145 ../USBFilter.cpp
146USBTest_LIBS = \
147 $(PATH_SDK_$(VBOX_WINDDK)_LIB)/newdev.lib \
148 $(LIB_RUNTIME) \
149 $(PATH_STAGE_LIB)/SUPR3$(VBOX_SUFF_LIB) \
150 $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB)
151
152#
153# Install the INF files.
154#
155install-infs_TEMPLATE = VBoxR0DrvInfCat
156install-infs_SOURCES = \
157 $(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.inf \
158 $(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.inf
159install-infs_CLEAN = $(install-infs_SOURCES)
160install-infs_BLDDIRS = \
161 $(PATH_TARGET)/VBoxUSBCat.dir \
162 $(PATH_TARGET)/VBoxUSBMonCat.dir
163
164$(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.inf: $(PATH_SUB_CURRENT)/dev/VBoxUSB.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
165 $(call MSG_GENERATE,install-infs,$@,$<)
166 $(call VBOX_EDIT_INF_FN,$<,$@)
167
168$(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.inf: $(PATH_SUB_CURRENT)/mon/VBoxUSBMon.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
169 $(call MSG_GENERATE,install-infs,$@,$<)
170 $(call VBOX_EDIT_INF_FN,$<,$@)
171
172ifdef VBOX_SIGNING_MODE
173install-infs_SOURCES += \
174 $(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.cat \
175 $(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.cat=>VBoxUSB-PreW10.cat \
176 $(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.sys \
177 $(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.cat \
178 $(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.cat=>VBoxUSBMon-PreW10.cat \
179 $(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.sys
180
181$(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.sys: $$(VBoxUSB_1_TARGET) | $$(dir $$@)
182 $(INSTALL) -m 644 $< $(@D)
183
184$(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.cat: \
185 $(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.inf \
186 $(PATH_TARGET)/VBoxUSBCat.dir/VBoxUSB.sys
187 $(call MSG_TOOL,Inf2Cat,VBoxUSB-inf,$@,$<)
188 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
189
190$(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.sys: $$(VBoxUSBMon_1_TARGET) | $$(dir $$@)
191 $(INSTALL) -m 644 $< $(@D)
192
193$(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.cat: \
194 $(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.inf \
195 $(PATH_TARGET)/VBoxUSBMonCat.dir/VBoxUSBMon.sys
196 $(call MSG_TOOL,Inf2Cat,VBoxUSBMon-inf,$@,$<)
197 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
198
199endif # signing
200
201# generate rules
202include $(FILE_KBUILD_SUB_FOOTER)
203
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