VirtualBox

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

Last change on this file since 29108 was 29108, checked in by vboxsync, 15 years ago

net[flt|adp]/win: disable delayed packet processing when intnet is on

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.2 KB
Line 
1# $Id: Makefile.kmk 29108 2010-05-05 20:17:42Z vboxsync $
2## @file
3# Sub-Makefile for the Network Filter Driver (VBoxNetFlt).
4#
5
6#
7# Copyright (C) 2008 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#
26SYSMODS += VBoxNetFlt
27VBoxNetFlt_TEMPLATE = VBOXR0DRV
28VBoxNetFlt_INST = $(INST_VBOXNETFLT)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
29if defined(VBOX_SIGNING_MODE) && "$(KBUILD_TARGET)" == "win"
30 VBoxNetFlt_NOINST = true
31endif
32VBoxNetFlt_DEFS = IN_RT_R0 IN_SUP_STATIC
33VBoxNetFlt_SDKS.win = W2K3DDK WINPSDKINCS
34VBoxNetFlt_INCS = .
35VBoxNetFlt_SOURCES.darwin = \
36 darwin/VBoxNetFlt-darwin.cpp
37#VBoxNetFlt_SOURCES.darwin += \
38# darwin/VBoxNetAdapter-darwin.cpp
39VBoxNetFlt_SOURCES.win = \
40 win/VBoxNetFlt-win.c \
41 win/VBoxNetFltPt-win.c \
42 win/VBoxNetFlt-win.rc
43ifdef VBOX_NETFLT_ONDEMAND_BIND
44 VBoxNetFlt_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
45else
46 VBoxNetFlt_DEFS.win += VBOXNETFLT_STATIC_CONFIG
47 VBoxNetFlt_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE
48 VBoxNetFlt_DEFS.win += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
49 VBoxNetFlt_DEFS.win += NDIS50_MINIPORT=1 NDIS50=1
50 VBoxNetFlt_SOURCES.win += win/VBoxNetFltMp-win.c
51endif
52ifdef VBOX_LOOPBACK_USEFLAGS
53 VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS
54endif
55VBoxNetFlt_SOURCES = VBoxNetFlt.c
56#VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
57VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
58VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
59VBoxNetFlt_LIBS.win = \
60 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
61 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
62 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
63 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
64VBoxNetFlt_LIBS = \
65 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
66
67darwin/VBoxNetFlt-darwin.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
68
69
70# Darwin extras.
71ifeq ($(KBUILD_TARGET),darwin)
72INSTALLS += VBoxNetFlt.kext
73VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
74VBoxNetFlt.kext_SOURCES = \
75 $(PATH_VBoxNetFlt.kext)/Info.plist
76VBoxNetFlt.kext_CLEAN = \
77 $(PATH_VBoxNetFlt.kext)/Info.plist
78
79$$(PATH_VBoxNetFlt.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
80 $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
81 $(QUIET)$(RM) -f $@
82 $(QUIET)$(SED) \
83 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
84 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
85 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
86 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
87 --output $@ \
88 $<
89
90INSTALLS.darwin += Scripts-darwin
91Scripts-darwin_INST = $(INST_DIST)
92Scripts-darwin_SOURCES = \
93 darwin/loadnetflt.sh
94endif # darwin
95
96
97ifeq ($(KBUILD_TARGET),win)
98#
99# Windows extras.
100#
101INSTALLS.win += VBoxNetFlt-inf
102VBoxNetFlt-inf_INST = $(INST_BIN)
103VBoxNetFlt-inf_MODE = a+r,u+w
104VBoxNetFlt-inf_SOURCES = \
105 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
106 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf
107VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
108VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir
109
110$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
111 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
112 $(call VBOX_EDIT_INF_FN,$<,$@)
113
114$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt_m.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
115 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
116 $(call VBOX_EDIT_INF_FN,$<,$@)
117
118 ifdef VBOX_SIGNING_MODE
119VBoxNetFlt-inf_SOURCES += \
120 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
121 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNotify.dll \
122 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
123
124$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(TARGET_VBoxNetFlt) | $$(dir $$@)
125 $(INSTALL) -m 644 $< $(@D)
126
127$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNotify.dll: $$(TARGET_VBoxNetFltNotify) | $$(dir $$@)
128 $(INSTALL) -m 644 $< $(@D)
129
130$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat: \
131 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
132 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNotify.dll \
133 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
134 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf
135 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
136 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
137
138 endif # signing
139
140#
141# WinNetConfig - static library with host network interface config API
142#
143LIBRARIES.win += WinNetConfig
144WinNetConfig_TEMPLATE = VBOXR3STATIC
145WinNetConfig_DEFS = _WIN32_WINNT=0x0501 _UNICODE UNICODE
146WinNetConfig_SDKS = WINPSDK W2K3DDK
147WinNetConfig_SOURCES = \
148 win/WinNetConfig.cpp
149WinNetConfig_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
150
151#
152# NetFltInstall
153#
154PROGRAMS.win += NetFltInstall
155NetFltInstall_TEMPLATE = VBOXR3STATIC
156NetFltInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
157NetFltInstall_SOURCES = win/NetFltInstall.cpp
158NetFltInstall_LIBS = $(TARGET_WinNetConfig) \
159 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
160 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
161
162
163#
164# NetFltUninstall
165#
166PROGRAMS.win += NetFltUninstall
167NetFltUninstall_TEMPLATE = VBOXR3STATIC
168NetFltUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
169NetFltUninstall_SOURCES = win/NetFltUninstall.cpp
170NetFltUninstall_LIBS = $(TARGET_WinNetConfig) \
171 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
172 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
173
174#
175# NetAdpInstall
176#
177PROGRAMS.win += NetAdpInstall
178NetAdpInstall_TEMPLATE = VBOXR3STATIC
179NetAdpInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
180NetAdpInstall_SOURCES = win/NetAdpInstall.cpp
181NetAdpInstall_LIBS = $(TARGET_WinNetConfig) \
182 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
183 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
184
185
186#
187# NetAdpUninstall
188#
189PROGRAMS.win += NetAdpUninstall
190NetAdpUninstall_TEMPLATE = VBOXR3STATIC
191NetAdpUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
192NetAdpUninstall_SOURCES = win/NetAdpUninstall.cpp
193NetAdpUninstall_LIBS = $(TARGET_WinNetConfig) \
194 $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
195 $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
196
197#
198# VBoxNetFltNotify
199#
200DLLS.win += VBoxNetFltNotify
201if defined(VBOX_SIGNING_MODE)
202VBoxNetFltNotify_NOINST = true
203endif
204VBoxNetFltNotify_TEMPLATE = VBOXR3STATIC
205VBoxNetFltNotify_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
206VBoxNetFltNotify_DEFS = _WIN32_WINNT=0x0500 WIN32 _ATL_STATIC_REGISTRY
207VBoxNetFltNotify_INCS = \
208 $(PATH_VBoxNetFltNotify)
209VBoxNetFltNotify_SOURCES = \
210 win/notifyobj/VBoxNetFltNotify.cpp \
211 win/notifyobj/VBoxNetFltNotify.def \
212 win/notifyobj/VBoxNetFltNotify.rc
213VBoxNetFltNotify_LIBS = \
214 $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib
215#VBoxNetFltNotify_INTERMEDIATES =
216VBoxNetFltNotify_DEPS = \
217 $(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn_i.c \
218 $(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn_p.c \
219 $(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn.h \
220 $(PATH_VBoxNetFltNotify)/dlldata.c \
221 $(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn.tlb
222VBoxNetFltNotify_CLEAN = $(VBoxNetFltNotify_DEPS)
223
224VBOXNETFLT_NOTIFY_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \
225 $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
226 $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
227 $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
228 ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK))
229
230$$(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn_i.c \
231+ $$(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn_p.c \
232+ $$(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn.h \
233+ $$(PATH_VBoxNetFltNotify)/dlldata.c \
234+ $$(PATH_VBoxNetFltNotify)/VBoxNetFltNotifyn.tlb: \
235 $(PATH_SUB_CURRENT)/win/notifyobj/VBoxNetFltNotifyn.idl \
236 | $$(dir $$@)
237 $(VBOXNETFLT_NOTIFY_IDL) /nologo \
238 /out $(call VBOX_FN_MAKE_WIN_PATH,$(PATH_VBoxNetFltNotify)) \
239 /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
240 $(addprefix /I , $(call VBOX_FN_MAKE_WIN_PATH,$(SDK_W2K3DDK_INCS))) \
241 $(call VBOX_FN_MAKE_WIN_PATH,$<)
242
243#
244# VBoxNetAdp.sys - The VirtualBox Adapter miniport driver.
245#
246SYSMODS.win += VBoxNetAdp
247VBoxNetAdp_TEMPLATE = VBOXR0DRV
248#VBoxNetAdp_INST = $(INST_VBOXNETADP)
249 if defined(VBOX_SIGNING_MODE)
250VBoxNetAdp_NOINST = true
251 endif
252VBoxNetAdp_DEFS = IN_RT_R0 IN_SUP_STATIC
253VBoxNetAdp_SDKS = W2K3DDK WINPSDKINCS
254VBoxNetAdp_INCS := $(PATH_SUB_CURRENT)
255VBoxNetAdp_SOURCES = \
256 VBoxNetFlt.c \
257 win/VBoxNetFlt-win.c \
258 win/VBoxNetFltMp-win.c \
259 win/VBoxNetFlt-win.rc
260VBoxNetAdp_DEFS += VBOXNETFLT_STATIC_CONFIG VBOXNETADP
261VBoxNetAdp_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE
262VBoxNetAdp_DEFS += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
263VBoxNetAdp_DEFS += NDIS50_MINIPORT=1 NDIS50=1
264VBoxNetAdp_LDFLAGS.win.x86 = -Entry:DriverEntry@8
265VBoxNetAdp_LDFLAGS.win.amd64 = -Entry:DriverEntry
266VBoxNetAdp_LIBS.win = \
267 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
268 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
269 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
270 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
271VBoxNetAdp_LIBS = \
272 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
273
274
275INSTALLS.win += VBoxNetAdp-inf
276VBoxNetAdp-inf_INST = $(INST_BIN)
277VBoxNetAdp-inf_MODE = a+r,u+w
278VBoxNetAdp-inf_SOURCES = \
279 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
280VBoxNetAdp-inf_CLEAN = $(VBoxNetAdp-inf_SOURCES)
281VBoxNetAdp-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetAdpCat.dir
282
283$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
284 $(call MSG_GENERATE,VBoxNetAdp-inf,$@,$<)
285 $(call VBOX_EDIT_INF_FN,$<,$@)
286
287 ifdef VBOX_SIGNING_MODE
288VBoxNetAdp-inf_SOURCES += \
289 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
290 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat
291
292$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys: $$(TARGET_VBoxNetAdp) | $$(dir $$@)
293 $(INSTALL) -m 644 $< $(@D)
294
295$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat: \
296 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
297 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
298 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
299 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
300
301 endif # ifdef VBOX_SIGNING_MODE
302
303endif #ifeq ($(KBUILD_TARGET), win)
304
305else if1of ($(KBUILD_TARGET), linux solaris freebsd) ## @todo merge this with the mixed case stuff.
306#
307# vboxnetflt(.ko/.o/) - The lower case driver.
308# Note! On Solaris the name has to be <= 8 chars long.
309#
310 ifdef VBOX_WITH_VBOXDRV
311SYSMODS += vboxnetflt
312vboxnetflt_TEMPLATE = VBOXR0DRV
313vboxnetflt_NAME.solaris = vboxflt
314vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
315vboxnetflt_DEFS = IN_RT_R0
316vboxnetflt_DEPS.solaris += $(VBOX_SVN_REV_KMK)
317vboxnetflt_NOINST.linux = true
318vboxnetflt_INCS.linux := \
319 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
320vboxnetflt_INCS := \
321 $(PATH_SUB_CURRENT)
322vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv
323 ifdef VBOXNETFLT_SOLARIS_USE_NETINFO
324vboxnetflt_DEFS.solaris += VBOXNETFLT_SOLARIS_USE_NETINFO
325vboxnetflt_LDFLAGS.solaris += -N misc/neti
326 endif
327vboxnetflt_LIBS = \
328 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
329## @todo vboxflt should resolves all the IPRT bits from vboxdrv.
330#vboxnetflt_LIBS += \
331# $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
332vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
333vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
334vboxnetflt_SOURCES.freebsd = freebsd/VBoxNetFlt-freebsd.c
335vboxnetflt_SOURCES = VBoxNetFlt.c
336solaris/VBoxNetFlt-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
337 ifdef VBOX_WITH_NETFLT_CROSSBOW
338SYSMODS += vboxnetbow
339vboxnetbow_TEMPLATE = VBOXR0DRV
340vboxnetbow_NAME = vboxbow
341vboxnetbow_DEFS = vboxnetflt_DEFS VBOX_WITH_NETFLT_CROSSBOW
342vboxnetbow_DEPS += $(VBOX_SVN_REV_KMK)
343vboxnetbow_INCS := $(PATH_SUB_CURRENT)
344vboxnetbow_LDFLAGS += -N drv/vboxdrv -N drv/vnic -N misc/mac -N misc/dls
345vboxnetbow_LIBS = \
346 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
347vboxnetbow_SOURCES.solaris = solaris/VBoxNetFltBow-solaris.c
348vboxnetbow_SOURCES = VBoxNetFlt.c
349solaris/VBoxNetFltBow-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
350 endif # VBOX_WITH_NETFLT_CROSSBOW
351 endif # VBOX_WITH_VBOXDRV
352endif # to be removed.
353
354
355ifeq ($(KBUILD_TARGET),linux)
356 #
357 # Install source files for compliation on Linux.
358 # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
359 #
360 include $(PATH_SUB_CURRENT)/linux/files_vboxnetflt
361 INSTALLS += VBoxNetFlt-src VBoxNetFlt-sh
362 VBoxNetFlt-src_INST = bin/src/vboxnetflt/
363 VBoxNetFlt-src_MODE = a+r,u+w
364 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #"
365 VBoxNetFlt-src_SOURCES+= \
366 $(if $(VBOX_OSE),,\
367 $(PATH_VBoxNetFlt-src)/dkms.conf) \
368 $(PATH_VBoxNetFlt-src)/Makefile
369 VBoxNetFlt-src_CLEAN = \
370 $(PATH_VBoxNetFlt-src)/dkms.conf \
371 $(PATH_VBoxNetFlt-src)/Makefile \
372 $(PATH_TARGET)/VBoxNetFlt-src-1.dep
373
374 VBoxNetFlt-sh_INST = bin/src/vboxnetflt/
375 VBoxNetFlt-sh_MODE = a+rx,u+w
376 VBoxNetFlt-sh_SOURCES = \
377 $(PATH_VBoxNetFlt-sh)/build_in_tmp \
378 $(if $(VBOX_OSE),,$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
379 VBoxNetFlt-sh_CLEAN = $(PATH_VBoxNetFlt-sh)/build_in_tmp
380
381
382 includedep $(PATH_TARGET)/VBoxNetFlt-src-1.dep
383 $$(PATH_VBoxNetFlt-src)/Makefile: \
384 $(PATH_SUB_CURRENT)/linux/Makefile \
385 $$(if $$(eq $$(VBoxNetFlt/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
386 | $$(dir $$@)
387 ifndef VBOX_WITH_HARDENING
388 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
389 else
390 $(QUIET)$(CP) -f $< $@
391 endif
392 %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxNetFlt-src-1.dep
393 %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxNetFlt-src-1.dep' 'VBoxNetFlt/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
394
395 # Script needed for building the kernel module
396 $$(PATH_VBoxNetFlt-sh)/build_in_tmp: \
397 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
398 $(VBOX_VERSION_STAMP) \
399 | $$(dir $$@)
400 $(call MSG_TOOL,Creating,,$@)
401 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxnetflt;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
402 $(QUIET)chmod 0755 $@
403
404 # Script needed for building the kernel module
405 $$(PATH_VBoxNetFlt-src)/dkms.conf: \
406 $(PATH_SUB_CURRENT)/linux/dkms.conf \
407 $(VBOX_VERSION_STAMP) \
408 | $$(dir $$@)
409 $(call MSG_TOOL,Creating,,$@)
410 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
411
412endif # linux
413
414# Gross hack for FreeBSD 7, should figure this out properly
415## @todo Properly generate opt_netgraph.h
416ifeq ($(KBUILD_TARGET),freebsd)
417vboxnetflt_DEPS.freebsd += $(PATH_OUT)/opt_netgraph.h
418$(PATH_OUT)/opt_netgraph.h:
419 echo > $(PATH_OUT)/opt_netgraph.h
420
421 #
422 # Install source files for compliation on FreeBSD.
423 # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
424 #
425 include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetflt
426 INSTALLS += VBoxNetFlt-src
427 VBoxNetFlt-src_INST = bin/src/vboxnetflt/
428 VBoxNetFlt-src_MODE = a+r,u+w
429 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #"
430 VBoxNetFlt-src_SOURCES+= \
431 $(PATH_VBoxNetFlt-src)/Makefile
432 VBoxNetFlt-src_CLEAN = \
433 $(PATH_VBoxNetFlt-src)/Makefile \
434
435 $$(PATH_VBoxNetFlt-src)/Makefile: \
436 $(PATH_SUB_CURRENT)/freebsd/Makefile \
437 $$(if $$(eq $$(VBoxNetFlt/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
438 | $$(dir $$@)
439 ifndef VBOX_WITH_HARDENING
440 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
441 else
442 $(QUIET)$(CP) -f $< $@
443 endif
444endif # freebsd
445
446include $(KBUILD_PATH)/subfooter.kmk
447
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