1 | # $Id: Makefile.kmk 78444 2019-05-08 07:44:36Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the Network Filter Driver (VBoxNetFlt).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008-2019 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 |
|
---|
27 | SUB_DEPTH = ../../../..
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 |
|
---|
31 | if1of ($(KBUILD_TARGET), darwin win) # this ifeq must go, see @todo around elif
|
---|
32 | #
|
---|
33 | # VBoxNetFlt.sys - The mixed case driver.
|
---|
34 | #
|
---|
35 | SYSMODS += VBoxNetFlt
|
---|
36 | VBoxNetFlt_TEMPLATE = VBOXR0DRV
|
---|
37 | VBoxNetFlt_INST = $(INST_VBOXNETFLT)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
|
---|
38 | VBoxNetFlt_DEBUG_INST.darwin = $(patsubst %/,%,$(INST_VBOXNETFLT))
|
---|
39 | if defined(VBOX_SIGNING_MODE) && "$(KBUILD_TARGET)" == "win"
|
---|
40 | VBoxNetFlt_INSTTYPE = none
|
---|
41 | VBoxNetFlt_DEBUG_INSTTYPE = both
|
---|
42 | endif
|
---|
43 | VBoxNetFlt_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
44 | VBoxNetFlt_INCS = .
|
---|
45 | VBoxNetFlt_SOURCES.darwin = \
|
---|
46 | darwin/VBoxNetFlt-darwin.cpp
|
---|
47 | VBoxNetFlt_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK_WLH) $(VBOX_WINPSDK)INCS
|
---|
48 | VBoxNetFlt_SOURCES.win = \
|
---|
49 | win/drv/VBoxNetFltP-win.cpp \
|
---|
50 | win/drv/VBoxNetFltM-win.cpp \
|
---|
51 | win/drv/VBoxNetFltRt-win.cpp \
|
---|
52 | win/drv/VBoxNetFlt-win.rc
|
---|
53 | # with WINDDKWLH the WIN9X_COMPAT_SPINLOCK is needed to avoid inline declaration of KeInitializeSpinLock
|
---|
54 | # otherwise the linker would complain about dumplicate _KeInitializeSpinLock@4 definition
|
---|
55 | # in ntoskrnl.lib and our object files
|
---|
56 | VBoxNetFlt_DEFS.win += WIN9X_COMPAT_SPINLOCK=1
|
---|
57 | VBoxNetFlt_DEFS.win += VBOXNETFLT_STATIC_CONFIG
|
---|
58 | VBoxNetFlt_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE
|
---|
59 | VBoxNetFlt_DEFS.win += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
|
---|
60 | VBoxNetFlt_DEFS.win += NDIS50_MINIPORT=1 NDIS50=1
|
---|
61 | ifdef VBOX_LOOPBACK_USEFLAGS
|
---|
62 | VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS
|
---|
63 | endif
|
---|
64 | VBoxNetFlt_SOURCES = VBoxNetFlt.c
|
---|
65 | #VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
66 | VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
67 | VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
68 | VBoxNetFlt_LIBS.win = \
|
---|
69 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/ntoskrnl.lib \
|
---|
70 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/hal.lib \
|
---|
71 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/ndis.lib \
|
---|
72 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/tdi.lib \
|
---|
73 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
74 | VBoxNetFlt_LIBS = \
|
---|
75 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
76 |
|
---|
77 | darwin/VBoxNetFlt-darwin.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
78 |
|
---|
79 |
|
---|
80 | # Darwin extras.
|
---|
81 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
82 | INSTALLS += VBoxNetFlt.kext
|
---|
83 | VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
|
---|
84 | VBoxNetFlt.kext_SOURCES = $(VBoxNetFlt.kext_0_OUTDIR)/Contents/Info.plist
|
---|
85 | VBoxNetFlt.kext_CLEAN = $(VBoxNetFlt.kext_0_OUTDIR)/Contents/Info.plist
|
---|
86 | VBoxNetFlt.kext_BLDDIRS = $(VBoxNetFlt.kext_0_OUTDIR)/Contents/
|
---|
87 |
|
---|
88 | $$(VBoxNetFlt.kext_0_OUTDIR)/Contents/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
89 | $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
|
---|
90 | $(QUIET)$(RM) -f $@
|
---|
91 | $(QUIET)$(SED) \
|
---|
92 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
93 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
94 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
95 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
96 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
97 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
98 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
99 | --output $@ \
|
---|
100 | $<
|
---|
101 |
|
---|
102 | $(evalcall2 VBOX_TEST_SIGN_KEXT,VBoxNetFlt)
|
---|
103 |
|
---|
104 | INSTALLS.darwin += Scripts-darwin
|
---|
105 | Scripts-darwin_INST = $(INST_DIST)
|
---|
106 | Scripts-darwin_EXEC_SOURCES = \
|
---|
107 | darwin/loadnetflt.sh
|
---|
108 | endif # darwin
|
---|
109 |
|
---|
110 |
|
---|
111 | ifeq ($(KBUILD_TARGET),win)
|
---|
112 | #
|
---|
113 | # Windows extras.
|
---|
114 | #
|
---|
115 | INSTALLS.win += VBoxNetFlt-inf
|
---|
116 | VBoxNetFlt-inf_TEMPLATE = VBoxR0DrvInfCat
|
---|
117 | VBoxNetFlt-inf_SOURCES = \
|
---|
118 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
|
---|
119 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf
|
---|
120 | VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
|
---|
121 | VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir
|
---|
122 |
|
---|
123 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
124 | $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
|
---|
125 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
126 |
|
---|
127 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetFltM.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
128 | $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
|
---|
129 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
130 |
|
---|
131 | ifdef VBOX_SIGNING_MODE
|
---|
132 | VBoxNetFlt-inf_SOURCES += \
|
---|
133 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
|
---|
134 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll \
|
---|
135 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
|
---|
136 |
|
---|
137 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(VBoxNetFlt_1_TARGET) | $$(dir $$@)
|
---|
138 | $(INSTALL) -m 644 $< $(@D)
|
---|
139 |
|
---|
140 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll: $$(VBoxNetFltNobj_1_TARGET) | $$(dir $$@)
|
---|
141 | $(INSTALL) -m 644 $< $(@D)
|
---|
142 |
|
---|
143 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat: \
|
---|
144 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
|
---|
145 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll \
|
---|
146 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
|
---|
147 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf
|
---|
148 | $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
|
---|
149 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
150 |
|
---|
151 | endif # signing
|
---|
152 |
|
---|
153 |
|
---|
154 | #
|
---|
155 | # VBoxNetLwf.sys - The light-weight filter driver for NDIS6.
|
---|
156 | #
|
---|
157 | SYSMODS += VBoxNetLwf
|
---|
158 | VBoxNetLwf_TEMPLATE = VBOXR0DRV
|
---|
159 | VBoxNetLwf_INST = $(INST_VBOXNETFLT)
|
---|
160 | if defined(VBOX_SIGNING_MODE)
|
---|
161 | VBoxNetLwf_INSTTYPE = none
|
---|
162 | VBoxNetLwf_DEBUG_INSTTYPE = both
|
---|
163 | endif
|
---|
164 | VBoxNetLwf_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
165 | VBoxNetLwf_INCS = .
|
---|
166 | VBoxNetLwf_SOURCES = VBoxNetFlt.c VBoxNetFlt.rc
|
---|
167 | VBoxNetLwf_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK_WLH) $(VBOX_WINPSDK)INCS
|
---|
168 | VBoxNetLwf_SOURCES.win = \
|
---|
169 | win/drv/VBoxNetLwf-win.cpp
|
---|
170 | # with WINDDKWLH the WIN9X_COMPAT_SPINLOCK is needed to avoid inline declaration of KeInitializeSpinLock
|
---|
171 | # otherwise the linker would complain about dumplicate _KeInitializeSpinLock@4 definition
|
---|
172 | # in ntoskrnl.lib and our object files
|
---|
173 | VBoxNetLwf_DEFS.win += WIN9X_COMPAT_SPINLOCK=1 NDISLWF=1 DBG=1
|
---|
174 | # VBoxNetLwf_DEFS.win += VBOXNETFLT_STATIC_CONFIG
|
---|
175 | # VBoxNetLwf_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE
|
---|
176 | # VBoxNetLwf_DEFS.win += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
|
---|
177 | VBoxNetLwf_DEFS.win += NDIS60=1
|
---|
178 | # ifdef VBOX_LOOPBACK_USEFLAGS
|
---|
179 | # VBoxNetLwf_DEFS.win += VBOX_LOOPBACK_USEFLAGS
|
---|
180 | # endif
|
---|
181 | # VBoxNetLwf_SOURCES = VBoxNetLwf.c
|
---|
182 | VBoxNetLwf_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
183 | VBoxNetLwf_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
184 | VBoxNetLwf_LIBS.win = \
|
---|
185 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/ntoskrnl.lib \
|
---|
186 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/hal.lib \
|
---|
187 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/ndis.lib \
|
---|
188 | $(PATH_SDK_$(VBOX_WINDDK_WLH)_LIB)/netio.lib \
|
---|
189 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
190 | VBoxNetLwf_LIBS = \
|
---|
191 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
192 | #
|
---|
193 | # VBoxNetLwf installation.
|
---|
194 | #
|
---|
195 | INSTALLS.win += VBoxNetLwf-inf
|
---|
196 | VBoxNetLwf-inf_TEMPLATE = VBoxR0DrvInfCat
|
---|
197 | VBoxNetLwf-inf_SOURCES = \
|
---|
198 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.inf
|
---|
199 | VBoxNetLwf-inf_CLEAN = $(VBoxNetLwf-inf_SOURCES)
|
---|
200 | VBoxNetLwf-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetLwfCat.dir
|
---|
201 |
|
---|
202 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetLwf.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
203 | $(call MSG_GENERATE,VBoxNetLwf-inf,$@,$<)
|
---|
204 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
205 |
|
---|
206 | ifdef VBOX_SIGNING_MODE
|
---|
207 | VBoxNetLwf-inf_SOURCES += \
|
---|
208 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.sys \
|
---|
209 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.cat \
|
---|
210 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.cat=>VBoxNetLwf-PreW10.cat
|
---|
211 |
|
---|
212 | # $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwfNobj.dll \
|
---|
213 |
|
---|
214 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.sys: $$(VBoxNetLwf_1_TARGET) | $$(dir $$@)
|
---|
215 | $(INSTALL) -m 644 $< $(@D)
|
---|
216 |
|
---|
217 | #$(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwfNobj.dll: $$(VBoxNetLwfNobj_1_TARGET) | $$(dir $$@)
|
---|
218 | # $(INSTALL) -m 644 $< $(@D)
|
---|
219 |
|
---|
220 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.cat: \
|
---|
221 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.sys \
|
---|
222 | $(PATH_TARGET)/VBoxNetLwfCat.dir/VBoxNetLwf.inf
|
---|
223 | $(call MSG_TOOL,Inf2Cat,VBoxNetLwf-inf,$@,$<)
|
---|
224 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
225 |
|
---|
226 | endif # signing
|
---|
227 |
|
---|
228 |
|
---|
229 |
|
---|
230 | #
|
---|
231 | # WinNetConfig - static library with host network interface config API
|
---|
232 | #
|
---|
233 | LIBRARIES.win += WinNetConfig
|
---|
234 | WinNetConfig_TEMPLATE = VBOXR3STATIC
|
---|
235 | WinNetConfig_DEFS = _WIN32_WINNT=0x0501 _UNICODE UNICODE
|
---|
236 | WinNetConfig_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK)
|
---|
237 | WinNetConfig_SOURCES = \
|
---|
238 | win/cfg/VBoxNetCfg.cpp
|
---|
239 | WinNetConfig_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
|
---|
240 |
|
---|
241 | #
|
---|
242 | # NetFltInstall
|
---|
243 | #
|
---|
244 | PROGRAMS.win += NetFltInstall
|
---|
245 | NetFltInstall_TEMPLATE = VBOXR3STATIC
|
---|
246 | NetFltInstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
247 | NetFltInstall_SOURCES = win/tools/VBoxNetFltInstall.cpp
|
---|
248 | NetFltInstall_LIBS = \
|
---|
249 | $(WinNetConfig_1_TARGET) \
|
---|
250 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
251 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
252 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
253 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
254 |
|
---|
255 |
|
---|
256 | #
|
---|
257 | # NetFltUninstall
|
---|
258 | #
|
---|
259 | PROGRAMS.win += NetFltUninstall
|
---|
260 | NetFltUninstall_TEMPLATE = VBOXR3STATIC
|
---|
261 | NetFltUninstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
262 | NetFltUninstall_SOURCES = win/tools/VBoxNetFltUninstall.cpp
|
---|
263 | NetFltUninstall_LIBS = \
|
---|
264 | $(WinNetConfig_1_TARGET) \
|
---|
265 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
266 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
267 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
268 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
269 |
|
---|
270 | #
|
---|
271 | # NetAdpInstall
|
---|
272 | #
|
---|
273 | PROGRAMS.win += NetAdpInstall
|
---|
274 | NetAdpInstall_TEMPLATE = VBOXR3STATIC
|
---|
275 | NetAdpInstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
276 | NetAdpInstall_SOURCES = win/tools/VBoxNetAdpInstall.cpp
|
---|
277 | NetAdpInstall_LIBS = \
|
---|
278 | $(WinNetConfig_1_TARGET) \
|
---|
279 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
280 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
281 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
282 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
283 |
|
---|
284 |
|
---|
285 | #
|
---|
286 | # NetAdpUninstall
|
---|
287 | #
|
---|
288 | PROGRAMS.win += NetAdpUninstall
|
---|
289 | NetAdpUninstall_TEMPLATE = VBOXR3STATIC
|
---|
290 | NetAdpUninstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
291 | NetAdpUninstall_SOURCES = win/tools/VBoxNetAdpUninstall.cpp
|
---|
292 | NetAdpUninstall_LIBS = \
|
---|
293 | $(WinNetConfig_1_TARGET) \
|
---|
294 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
295 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
296 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
297 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
298 |
|
---|
299 | #
|
---|
300 | # NetAdp6Install
|
---|
301 | #
|
---|
302 | PROGRAMS.win += NetAdp6Install
|
---|
303 | NetAdp6Install_TEMPLATE = VBOXR3STATIC
|
---|
304 | NetAdp6Install_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
305 | NetAdp6Install_SOURCES = win/tools/VBoxNetAdpInstall.cpp
|
---|
306 | NetAdp6Install_DEFS += NDIS60=1
|
---|
307 | NetAdp6Install_LIBS = \
|
---|
308 | $(WinNetConfig_1_TARGET) \
|
---|
309 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
310 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
311 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
312 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
313 |
|
---|
314 |
|
---|
315 | #
|
---|
316 | # NetAdp6Uninstall
|
---|
317 | #
|
---|
318 | PROGRAMS.win += NetAdp6Uninstall
|
---|
319 | NetAdp6Uninstall_TEMPLATE = VBOXR3STATIC
|
---|
320 | NetAdp6Uninstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
321 | NetAdp6Uninstall_SOURCES = win/tools/VBoxNetAdpUninstall.cpp
|
---|
322 | NetAdp6Uninstall_DEFS += NDIS60=1
|
---|
323 | NetAdp6Uninstall_LIBS = \
|
---|
324 | $(WinNetConfig_1_TARGET) \
|
---|
325 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
326 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
327 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
328 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
329 |
|
---|
330 | #
|
---|
331 | # NetLwfInstall
|
---|
332 | #
|
---|
333 | PROGRAMS.win += NetLwfInstall
|
---|
334 | NetLwfInstall_TEMPLATE = VBOXR3STATIC
|
---|
335 | NetLwfInstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
336 | NetLwfInstall_SOURCES = win/tools/VBoxNetLwfInstall.cpp
|
---|
337 | NetLwfInstall_LIBS = \
|
---|
338 | $(WinNetConfig_1_TARGET) \
|
---|
339 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
340 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
341 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
342 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
343 |
|
---|
344 |
|
---|
345 | #
|
---|
346 | # NetLwfUninstall
|
---|
347 | #
|
---|
348 | PROGRAMS.win += NetLwfUninstall
|
---|
349 | NetLwfUninstall_TEMPLATE = VBOXR3STATIC
|
---|
350 | NetLwfUninstall_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
351 | NetLwfUninstall_SOURCES = win/tools/VBoxNetLwfUninstall.cpp
|
---|
352 | NetLwfUninstall_LIBS = \
|
---|
353 | $(WinNetConfig_1_TARGET) \
|
---|
354 | $(PATH_STAGE_LIB)/VBoxDrvCfg$(VBOX_SUFF_LIB) \
|
---|
355 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/Newdev.lib \
|
---|
356 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
357 | $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/WbemUuid.Lib
|
---|
358 |
|
---|
359 | #
|
---|
360 | # VBoxNetFltNobj
|
---|
361 | #
|
---|
362 | DLLS.win += VBoxNetFltNobj
|
---|
363 | VBoxNetFltNobj_TEMPLATE = VBOXR3STATIC
|
---|
364 | if defined(VBOX_SIGNING_MODE)
|
---|
365 | VBoxNetFltNobj_INSTTYPE = none
|
---|
366 | VBoxNetFltNobj_DEBUG_INSTTYPE = both
|
---|
367 | endif
|
---|
368 | VBoxNetFltNobj_SDKS = ReorderCompilerIncs $(VBOX_WINPSDK) $(VBOX_WINDDK) VBOX_NTDLL
|
---|
369 | VBoxNetFltNobj_DEFS = _WIN32_WINNT=0x0500 WIN32 _ATL_STATIC_REGISTRY
|
---|
370 | VBoxNetFltNobj_INCS = \
|
---|
371 | $(VBoxNetFltNobj_0_OUTDIR)
|
---|
372 | VBoxNetFltNobj_SOURCES = \
|
---|
373 | win/nobj/VBoxNetFltNobj.cpp \
|
---|
374 | win/nobj/VBoxNetFltNobj.def \
|
---|
375 | win/nobj/VBoxNetFltNobj.rc
|
---|
376 | VBoxNetFltNobj_LIBS = \
|
---|
377 | $(VBOX_LIB_RUNTIME_STATIC)
|
---|
378 | #VBoxNetFltNobj_INTERMEDIATES =
|
---|
379 | VBoxNetFltNobj_DEPS = \
|
---|
380 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c \
|
---|
381 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c \
|
---|
382 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h \
|
---|
383 | $(VBoxNetFltNobj_0_OUTDIR)/dlldata.c \
|
---|
384 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.tlb
|
---|
385 | VBoxNetFltNobj_CLEAN = $(VBoxNetFltNobj_DEPS)
|
---|
386 |
|
---|
387 | $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c \
|
---|
388 | + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c \
|
---|
389 | + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h \
|
---|
390 | + $$(VBoxNetFltNobj_0_OUTDIR)/dlldata.c \
|
---|
391 | + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.tlb: \
|
---|
392 | $(PATH_SUB_CURRENT)/win/nobj/VBoxNetFltNobjT.idl \
|
---|
393 | | $$(dir $$@)
|
---|
394 | $(VBOX_WIN_MIDL) /nologo \
|
---|
395 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxNetFltNobj_0_OUTDIR)) \
|
---|
396 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
|
---|
397 | $(addprefix /I , $(call VBOX_FN_MAKE_WIN_PATH,$(SDK_$(VBOX_WINDDK)_INCS))) \
|
---|
398 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
399 |
|
---|
400 | #
|
---|
401 | # VBoxNetAdp.sys - The VirtualBox Adapter miniport driver.
|
---|
402 | #
|
---|
403 | SYSMODS.win += VBoxNetAdp
|
---|
404 | VBoxNetAdp_TEMPLATE = VBOXR0DRV
|
---|
405 | #VBoxNetAdp_INST = $(INST_VBOXNETADP)
|
---|
406 | if defined(VBOX_SIGNING_MODE)
|
---|
407 | VBoxNetAdp_INSTTYPE.win = none
|
---|
408 | VBoxNetAdp_DEBUG_INSTTYPE.win = both
|
---|
409 | endif
|
---|
410 | VBoxNetAdp_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
411 | VBoxNetAdp_INCS := $(PATH_SUB_CURRENT)
|
---|
412 | VBoxNetAdp_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_WLH) $(VBOX_WINPSDK)INCS
|
---|
413 | VBoxNetAdp_SOURCES = \
|
---|
414 | VBoxNetFlt.c \
|
---|
415 | win/drv/VBoxNetFltM-win.cpp \
|
---|
416 | win/drv/VBoxNetFltRt-win.cpp \
|
---|
417 | win/drv/VBoxNetFlt-win.rc
|
---|
418 | VBoxNetAdp_DEFS += VBOXNETFLT_STATIC_CONFIG VBOXNETADP
|
---|
419 | VBoxNetAdp_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE
|
---|
420 | VBoxNetAdp_DEFS += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
|
---|
421 | VBoxNetAdp_DEFS += NDIS50_MINIPORT=1 NDIS50=1
|
---|
422 | VBoxNetAdp_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
423 | VBoxNetAdp_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
424 | VBoxNetAdp_LIBS.win = \
|
---|
425 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ntoskrnl.lib \
|
---|
426 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/hal.lib \
|
---|
427 | $(PATH_SDK_$(VBOX_WINDDK)_LIB)/ndis.lib \
|
---|
428 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
429 | VBoxNetAdp_LIBS = \
|
---|
430 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
431 |
|
---|
432 |
|
---|
433 | INSTALLS.win += VBoxNetAdp-inf
|
---|
434 | VBoxNetAdp-inf_TEMPLATE = VBoxR0DrvInfCat
|
---|
435 | VBoxNetAdp-inf_SOURCES = \
|
---|
436 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
|
---|
437 | VBoxNetAdp-inf_CLEAN = $(VBoxNetAdp-inf_SOURCES)
|
---|
438 | VBoxNetAdp-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetAdpCat.dir
|
---|
439 |
|
---|
440 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
441 | $(call MSG_GENERATE,VBoxNetAdp-inf,$@,$<)
|
---|
442 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
443 |
|
---|
444 | ifdef VBOX_SIGNING_MODE
|
---|
445 | VBoxNetAdp-inf_SOURCES += \
|
---|
446 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
|
---|
447 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat
|
---|
448 |
|
---|
449 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys: $$(VBoxNetAdp_1_TARGET) | $$(dir $$@)
|
---|
450 | $(INSTALL) -m 644 $< $(@D)
|
---|
451 |
|
---|
452 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat: \
|
---|
453 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
|
---|
454 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
|
---|
455 | $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
|
---|
456 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
457 |
|
---|
458 | endif # ifdef VBOX_SIGNING_MODE
|
---|
459 |
|
---|
460 | endif #ifeq ($(KBUILD_TARGET), win)
|
---|
461 |
|
---|
462 | else if1of ($(KBUILD_TARGET), solaris freebsd) ## @todo merge this with the mixed case stuff.
|
---|
463 | #
|
---|
464 | # vboxnetflt(.ko/.o/) - The lower case driver.
|
---|
465 | # Note! On Solaris the name has to be <= 8 chars long.
|
---|
466 | # The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
|
---|
467 | #
|
---|
468 | ifdef VBOX_WITH_VBOXDRV
|
---|
469 | SYSMODS += vboxnetflt
|
---|
470 | vboxnetflt_TEMPLATE = VBOXR0DRV
|
---|
471 | vboxnetflt_NAME.solaris = vboxflt
|
---|
472 | vboxnetflt_DEFS = IN_RT_R0
|
---|
473 | vboxnetflt_DEPS.solaris += $(VBOX_SVN_REV_KMK)
|
---|
474 | vboxnetflt_INCS := \
|
---|
475 | $(PATH_SUB_CURRENT)
|
---|
476 | vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv -N misc/ctf
|
---|
477 | vboxnetflt_LIBS = \
|
---|
478 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
479 | ## @todo vboxflt should resolves all the IPRT bits from vboxdrv.
|
---|
480 | #vboxnetflt_LIBS += \
|
---|
481 | # $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
482 | vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
|
---|
483 | vboxnetflt_SOURCES.freebsd = freebsd/VBoxNetFlt-freebsd.c
|
---|
484 | vboxnetflt_SOURCES = VBoxNetFlt.c
|
---|
485 | solaris/VBoxNetFlt-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
486 |
|
---|
487 | ifdef VBOX_WITH_NETFLT_CROSSBOW
|
---|
488 | SYSMODS += vboxnetbow
|
---|
489 | vboxnetbow_TEMPLATE = VBOXR0DRV
|
---|
490 | vboxnetbow_NAME = vboxbow
|
---|
491 | vboxnetbow_DEFS = vboxnetflt_DEFS VBOX_WITH_NETFLT_CROSSBOW
|
---|
492 | vboxnetbow_INCS := $(PATH_SUB_CURRENT)
|
---|
493 | vboxnetbow_LDFLAGS += -N drv/vboxdrv -N drv/vnic -N misc/mac -N misc/dls
|
---|
494 | vboxnetbow_LIBS = \
|
---|
495 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
496 | vboxnetbow_SOURCES.solaris = solaris/VBoxNetFltBow-solaris.c
|
---|
497 | vboxnetbow_SOURCES = VBoxNetFlt.c
|
---|
498 | solaris/VBoxNetFltBow-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
499 | endif # VBOX_WITH_NETFLT_CROSSBOW
|
---|
500 | endif # VBOX_WITH_VBOXDRV
|
---|
501 | endif # to be removed.
|
---|
502 |
|
---|
503 |
|
---|
504 | ifeq ($(KBUILD_TARGET),linux)
|
---|
505 | #
|
---|
506 | # Install source files for compilation on Linux.
|
---|
507 | # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
|
---|
508 | #
|
---|
509 | include $(PATH_SUB_CURRENT)/linux/files_vboxnetflt
|
---|
510 | INSTALLS += VBoxNetFlt-src VBoxNetFlt-sh
|
---|
511 | VBoxNetFlt-src_INST = bin/src/vboxnetflt/
|
---|
512 | VBoxNetFlt-src_SOURCES = \
|
---|
513 | $(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES)) \
|
---|
514 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile
|
---|
515 | VBoxNetFlt-src_CLEAN = \
|
---|
516 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile \
|
---|
517 | $(PATH_TARGET)/VBoxNetFlt-src-1.dep \
|
---|
518 |
|
---|
519 | # Scripts needed for building the kernel module.
|
---|
520 |
|
---|
521 | includedep $(PATH_TARGET)/VBoxNetFlt-src-1.dep
|
---|
522 | $$(VBoxNetFlt-src_0_OUTDIR)/Makefile: \
|
---|
523 | $(PATH_SUB_CURRENT)/linux/Makefile \
|
---|
524 | $$(if $$(eq $$(VBoxNetFlt/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
525 | | $$(dir $$@)
|
---|
526 | $(QUIET)$(RM) -f -- $@
|
---|
527 | ifndef VBOX_WITH_HARDENING
|
---|
528 | $(QUIET)$(SED) -e "s;VBOX_WITH_HARDENING;;g" --output $@ $<
|
---|
529 | else
|
---|
530 | $(QUIET)$(CP) -f $< $@
|
---|
531 | endif
|
---|
532 | %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxNetFlt-src-1.dep
|
---|
533 | %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxNetFlt-src-1.dep' 'VBoxNetFlt/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
|
---|
534 |
|
---|
535 | #
|
---|
536 | # Build test for the linux host kernel modules.
|
---|
537 | #
|
---|
538 | $(evalcall2 VBOX_LINUX_KMOD_TEST_BUILD_RULE_FN,VBoxNetFlt-src,vboxdrv-src,)
|
---|
539 | endif # linux
|
---|
540 |
|
---|
541 | # Gross hack for FreeBSD 7, should figure this out properly
|
---|
542 | ## @todo Properly generate opt_netgraph.h
|
---|
543 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
544 | vboxnetflt_DEPS.freebsd += $(PATH_OUT)/opt_netgraph.h
|
---|
545 | $(PATH_OUT)/opt_netgraph.h:
|
---|
546 | echo > $(PATH_OUT)/opt_netgraph.h
|
---|
547 |
|
---|
548 | #
|
---|
549 | # Install source files for compilation on FreeBSD.
|
---|
550 | # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
|
---|
551 | #
|
---|
552 | include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetflt
|
---|
553 | INSTALLS += VBoxNetFlt-src
|
---|
554 | VBoxNetFlt-src_INST = bin/src/vboxnetflt/
|
---|
555 | VBoxNetFlt-src_SOURCES = \
|
---|
556 | $(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES)) \
|
---|
557 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile
|
---|
558 | VBoxNetFlt-src_CLEAN = \
|
---|
559 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile \
|
---|
560 |
|
---|
561 | $$(VBoxNetFlt-src_0_OUTDIR)/Makefile: \
|
---|
562 | $(PATH_SUB_CURRENT)/freebsd/Makefile \
|
---|
563 | $$(if $$(eq $$(VBoxNetFlt/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
564 | | $$(dir $$@)
|
---|
565 | $(QUIET)$(RM) -f -- $@
|
---|
566 | $(QUIET)$(CP) -f $< $@
|
---|
567 | ifndef VBOX_WITH_HARDENING
|
---|
568 | $(QUIET)$(SED) -e "s;VBOX_WITH_HARDENING;;g" --output $@.tmp $@
|
---|
569 | ${QUIET}$(MV) -f $@.tmp $@
|
---|
570 | endif
|
---|
571 | ifndef VBOX_WITH_NETFLT_VIMAGE
|
---|
572 | $(QUIET)$(SED) -e "s;-DVIMAGE;;g" --output $@.tmp $@
|
---|
573 | ${QUIET}$(MV) -f $@.tmp $@
|
---|
574 | endif
|
---|
575 | endif # freebsd
|
---|
576 |
|
---|
577 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
578 |
|
---|