VirtualBox

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

Last change on this file since 33540 was 33540, checked in by vboxsync, 14 years ago

*: spelling fixes, thanks Timeless!

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