VirtualBox

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

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

HostDrivers/**/Makefile.kmk: Quiet linking on darwin.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 14.5 KB
Line 
1# $Id: Makefile.kmk 24675 2009-11-15 15:45:49Z vboxsync $
2## @file
3# Sub-Makefile for the Network Filter Driver (VBoxNetFlt).
4#
5
6#
7# Copyright (C) 2008 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25
26if1of ($(KBUILD_TARGET), darwin win) # this ifeq must go, see @todo around elif
27#
28# VBoxNetFlt.sys - The mixed case driver.
29#
30SYSMODS += VBoxNetFlt
31VBoxNetFlt_TEMPLATE = VBOXR0DRV
32VBoxNetFlt_INST = $(INST_VBOXNETFLT)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
33if defined(VBOX_SIGNING_MODE) && "$(KBUILD_TARGET)" == "win"
34 VBoxNetFlt_NOINST = true
35endif
36VBoxNetFlt_DEFS = IN_RT_R0 IN_SUP_STATIC
37VBoxNetFlt_SDKS.win = W2K3DDK WINPSDKINCS
38VBoxNetFlt_INCS = .
39VBoxNetFlt_SOURCES.darwin = \
40 darwin/VBoxNetFlt-darwin.cpp
41#VBoxNetFlt_SOURCES.darwin += \
42# darwin/VBoxNetAdapter-darwin.cpp
43VBoxNetFlt_SOURCES.win = \
44 win/VBoxNetFlt-win.c \
45 win/VBoxNetFltPt-win.c \
46 win/VBoxNetFlt-win.rc
47ifdef VBOX_NETFLT_ONDEMAND_BIND
48 VBoxNetFlt_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
49else
50 VBoxNetFlt_DEFS.win += VBOXNETFLT_STATIC_CONFIG
51 VBoxNetFlt_SOURCES.win += win/VBoxNetFltMp-win.c
52endif
53ifdef VBOX_LOOPBACK_USEFLAGS
54 VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS
55endif
56VBoxNetFlt_SOURCES = VBoxNetFlt.c
57#VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
58VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
59VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
60VBoxNetFlt_SOURCES.win.amd64 += win/VBoxNetFltA-win.asm
61VBoxNetFlt_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
62VBoxNetFlt_LIBS.win = \
63 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
64 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
65 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
66 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
67VBoxNetFlt_LIBS = \
68 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
69
70darwin/VBoxNetFlt-darwin.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
71
72
73# Darwin extras.
74ifeq ($(KBUILD_TARGET),darwin)
75INSTALLS += VBoxNetFlt.kext
76VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
77VBoxNetFlt.kext_SOURCES = \
78 $(PATH_VBoxNetFlt.kext)/Info.plist
79VBoxNetFlt.kext_CLEAN = \
80 $(PATH_VBoxNetFlt.kext)/Info.plist
81
82$$(PATH_VBoxNetFlt.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
83 $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
84 $(QUIET)$(RM) -f $@
85 $(QUIET)$(SED) \
86 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
87 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
88 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
89 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/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
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.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_LDFLAGS.win.x86 = -Entry:DriverEntry@8
262VBoxNetAdp_LDFLAGS.win.amd64 = -Entry:DriverEntry
263VBoxNetAdp_SOURCES.win.amd64 += win/VBoxNetFltA-win.asm
264VBoxNetAdp_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
265VBoxNetAdp_LIBS.win = \
266 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
267 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
268 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
269 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
270VBoxNetAdp_LIBS = \
271 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
272
273
274INSTALLS.win += VBoxNetAdp-inf
275VBoxNetAdp-inf_INST = $(INST_BIN)
276VBoxNetAdp-inf_MODE = a+r,u+w
277VBoxNetAdp-inf_SOURCES = \
278 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
279VBoxNetAdp-inf_CLEAN = $(VBoxNetAdp-inf_SOURCES)
280VBoxNetAdp-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetAdpCat.dir
281
282$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
283 $(call MSG_GENERATE,VBoxNetAdp-inf,$@,$<)
284 $(call VBOX_EDIT_INF_FN,$<,$@)
285
286 ifdef VBOX_SIGNING_MODE
287VBoxNetAdp-inf_SOURCES += \
288 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
289 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat
290
291$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys: $$(TARGET_VBoxNetAdp) | $$(dir $$@)
292 $(INSTALL) -m 644 $< $(@D)
293
294$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat: \
295 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
296 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
297 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
298 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
299
300 endif # ifdef VBOX_SIGNING_MODE
301
302endif #ifeq ($(KBUILD_TARGET), win)
303
304else if1of ($(KBUILD_TARGET), linux solaris freebsd) ## @todo merge this with the mixed case stuff.
305#
306# vboxnetflt(.ko/.o/) - The lower case driver.
307# Note! On Solaris the name has to be <= 8 chars long.
308#
309 ifdef VBOX_WITH_VBOXDRV
310SYSMODS += vboxnetflt
311vboxnetflt_TEMPLATE = VBOXR0DRV
312vboxnetflt_NAME.solaris = vboxflt
313vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
314vboxnetflt_DEFS = IN_RT_R0
315vboxnetflt_DEPS.solaris += $(VBOX_SVN_REV_KMK)
316vboxnetflt_NOINST.linux = true
317vboxnetflt_INCS.linux := \
318 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
319vboxnetflt_INCS := \
320 $(PATH_SUB_CURRENT)
321vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv
322 ifdef VBOXNETFLT_SOLARIS_USE_NETINFO
323vboxnetflt_DEFS.solaris += VBOXNETFLT_SOLARIS_USE_NETINFO
324vboxnetflt_LDFLAGS.solaris += -N misc/neti
325 endif
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
335 endif
336
337solaris/VBoxNetFlt-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
338endif # to be removed.
339
340
341ifeq ($(KBUILD_TARGET),linux)
342 #
343 # Install source files for compliation on Linux.
344 # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
345 #
346 include $(PATH_SUB_CURRENT)/linux/files_vboxnetflt
347 INSTALLS += VBoxNetFlt-src VBoxNetFlt-sh
348 VBoxNetFlt-src_INST = bin/src/vboxnetflt/
349 VBoxNetFlt-src_MODE = a+r,u+w
350 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #"
351 VBoxNetFlt-src_SOURCES+= \
352 $(if $(VBOX_OSE),,\
353 $(PATH_VBoxNetFlt-src)/dkms.conf) \
354 $(PATH_VBoxNetFlt-src)/Makefile
355 VBoxNetFlt-src_CLEAN = \
356 $(PATH_VBoxNetFlt-src)/dkms.conf \
357 $(PATH_VBoxNetFlt-src)/Makefile \
358 $(PATH_TARGET)/VBoxNetFlt-src-1.dep
359
360 VBoxNetFlt-sh_INST = bin/src/vboxnetflt/
361 VBoxNetFlt-sh_MODE = a+rx,u+w
362 VBoxNetFlt-sh_SOURCES = \
363 $(PATH_VBoxNetFlt-sh)/build_in_tmp \
364 $(if $(VBOX_OSE),,$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
365 VBoxNetFlt-sh_CLEAN = $(PATH_VBoxNetFlt-sh)/build_in_tmp
366
367
368 includedep $(PATH_TARGET)/VBoxNetFlt-src-1.dep
369 $$(PATH_VBoxNetFlt-src)/Makefile: \
370 $(PATH_SUB_CURRENT)/linux/Makefile \
371 $$(if $$(eq $$(VBoxNetFlt/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
372 | $$(dir $$@)
373 ifndef VBOX_WITH_HARDENING
374 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
375 else
376 $(QUIET)$(CP) -f $< $@
377 endif
378 %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxNetFlt-src-1.dep
379 %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxNetFlt-src-1.dep' 'VBoxNetFlt/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
380
381 # Script needed for building the kernel module
382 $$(PATH_VBoxNetFlt-sh)/build_in_tmp: \
383 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
384 $(VBOX_VERSION_STAMP) \
385 | $$(dir $$@)
386 $(call MSG_TOOL,Creating,,$@)
387 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxnetflt;g" --output $@ $<
388 $(QUIET)chmod 0755 $@
389
390 # Script needed for building the kernel module
391 $$(PATH_VBoxNetFlt-src)/dkms.conf: \
392 $(PATH_SUB_CURRENT)/linux/dkms.conf \
393 $(VBOX_VERSION_STAMP) \
394 | $$(dir $$@)
395 $(call MSG_TOOL,Creating,,$@)
396 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
397
398endif # linux
399
400# Gross hack for FreeBSD 7, should figure this out properly
401## @todo Properly generate opt_netgraph.h
402ifeq ($(KBUILD_TARGET),freebsd)
403vboxnetflt_DEPS.freebsd += $(PATH_OUT)/opt_netgraph.h
404$(PATH_OUT)/opt_netgraph.h:
405 echo > $(PATH_OUT)/opt_netgraph.h
406
407 #
408 # Install source files for compliation on FreeBSD.
409 # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
410 #
411 include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetflt
412 INSTALLS += VBoxNetFlt-src
413 VBoxNetFlt-src_INST = bin/src/vboxnetflt/
414 VBoxNetFlt-src_MODE = a+r,u+w
415 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #"
416 VBoxNetFlt-src_SOURCES+= \
417 $(PATH_VBoxNetFlt-src)/Makefile
418 VBoxNetFlt-src_CLEAN = \
419 $(PATH_VBoxNetFlt-src)/Makefile \
420
421 $$(PATH_VBoxNetFlt-src)/Makefile: \
422 $(PATH_SUB_CURRENT)/freebsd/Makefile \
423 $$(if $$(eq $$(VBoxNetFlt/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
424 | $$(dir $$@)
425 ifndef VBOX_WITH_HARDENING
426 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
427 else
428 $(QUIET)$(CP) -f $< $@
429 endif
430endif # freebsd
431
432include $(KBUILD_PATH)/subfooter.kmk
433
434
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