VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk@ 56712

Last change on this file since 56712 was 56293, checked in by vboxsync, 10 years ago

HostDrivers: Updated (C) year.

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