VirtualBox

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

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

netflt: fix build warning

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.3 KB
Line 
1# $Id: Makefile.kmk 26927 2010-03-02 00:08:05Z 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_DEFS.win += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
52 VBoxNetFlt_DEFS.win += NDIS50_MINIPORT=1 NDIS50=1
53 VBoxNetFlt_SOURCES.win += win/VBoxNetFltMp-win.c
54endif
55ifdef VBOX_LOOPBACK_USEFLAGS
56 VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS
57endif
58VBoxNetFlt_SOURCES = VBoxNetFlt.c
59#VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
60VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
61VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
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
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 += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
265VBoxNetAdp_DEFS += NDIS50_MINIPORT=1 NDIS50=1
266VBoxNetAdp_LDFLAGS.win.x86 = -Entry:DriverEntry@8
267VBoxNetAdp_LDFLAGS.win.amd64 = -Entry:DriverEntry
268VBoxNetAdp_LIBS.win = \
269 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
270 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
271 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
272 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
273VBoxNetAdp_LIBS = \
274 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
275
276
277INSTALLS.win += VBoxNetAdp-inf
278VBoxNetAdp-inf_INST = $(INST_BIN)
279VBoxNetAdp-inf_MODE = a+r,u+w
280VBoxNetAdp-inf_SOURCES = \
281 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
282VBoxNetAdp-inf_CLEAN = $(VBoxNetAdp-inf_SOURCES)
283VBoxNetAdp-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetAdpCat.dir
284
285$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
286 $(call MSG_GENERATE,VBoxNetAdp-inf,$@,$<)
287 $(call VBOX_EDIT_INF_FN,$<,$@)
288
289 ifdef VBOX_SIGNING_MODE
290VBoxNetAdp-inf_SOURCES += \
291 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
292 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat
293
294$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys: $$(TARGET_VBoxNetAdp) | $$(dir $$@)
295 $(INSTALL) -m 644 $< $(@D)
296
297$(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat: \
298 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
299 $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
300 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
301 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
302
303 endif # ifdef VBOX_SIGNING_MODE
304
305endif #ifeq ($(KBUILD_TARGET), win)
306
307else if1of ($(KBUILD_TARGET), linux solaris freebsd) ## @todo merge this with the mixed case stuff.
308#
309# vboxnetflt(.ko/.o/) - The lower case driver.
310# Note! On Solaris the name has to be <= 8 chars long.
311#
312 ifdef VBOX_WITH_VBOXDRV
313SYSMODS += vboxnetflt
314vboxnetflt_TEMPLATE = VBOXR0DRV
315vboxnetflt_NAME.solaris = vboxflt
316vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
317vboxnetflt_DEFS = IN_RT_R0
318vboxnetflt_DEPS.solaris += $(VBOX_SVN_REV_KMK)
319vboxnetflt_NOINST.linux = true
320vboxnetflt_INCS.linux := \
321 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
322vboxnetflt_INCS := \
323 $(PATH_SUB_CURRENT)
324vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv
325 ifdef VBOXNETFLT_SOLARIS_USE_NETINFO
326vboxnetflt_DEFS.solaris += VBOXNETFLT_SOLARIS_USE_NETINFO
327vboxnetflt_LDFLAGS.solaris += -N misc/neti
328 endif
329vboxnetflt_LIBS = \
330 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
331## @todo vboxflt should resolves all the IPRT bits from vboxdrv.
332#vboxnetflt_LIBS += \
333# $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
334vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
335vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
336vboxnetflt_SOURCES.freebsd = freebsd/VBoxNetFlt-freebsd.c
337vboxnetflt_SOURCES = VBoxNetFlt.c
338solaris/VBoxNetFlt-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
339 ifdef VBOX_WITH_NETFLT_CROSSBOW
340SYSMODS += vboxnetbow
341vboxnetbow_TEMPLATE = VBOXR0DRV
342vboxnetbow_NAME = vboxbow
343vboxnetbow_DEFS = vboxnetflt_DEFS VBOX_WITH_NETFLT_CROSSBOW
344vboxnetbow_DEPS += $(VBOX_SVN_REV_KMK)
345vboxnetbow_INCS := $(PATH_SUB_CURRENT)
346vboxnetbow_LDFLAGS += -N drv/vboxdrv -N drv/vnic -N misc/mac -N misc/dls
347vboxnetbow_LIBS = \
348 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
349vboxnetbow_SOURCES.solaris = solaris/VBoxNetFltBow-solaris.c
350vboxnetbow_SOURCES = VBoxNetFlt.c
351solaris/VBoxNetFltBow-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
352 endif # VBOX_WITH_NETFLT_CROSSBOW
353 endif # VBOX_WITH_VBOXDRV
354endif # to be removed.
355
356
357ifeq ($(KBUILD_TARGET),linux)
358 #
359 # Install source files for compliation on Linux.
360 # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
361 #
362 include $(PATH_SUB_CURRENT)/linux/files_vboxnetflt
363 INSTALLS += VBoxNetFlt-src VBoxNetFlt-sh
364 VBoxNetFlt-src_INST = bin/src/vboxnetflt/
365 VBoxNetFlt-src_MODE = a+r,u+w
366 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #"
367 VBoxNetFlt-src_SOURCES+= \
368 $(if $(VBOX_OSE),,\
369 $(PATH_VBoxNetFlt-src)/dkms.conf) \
370 $(PATH_VBoxNetFlt-src)/Makefile
371 VBoxNetFlt-src_CLEAN = \
372 $(PATH_VBoxNetFlt-src)/dkms.conf \
373 $(PATH_VBoxNetFlt-src)/Makefile \
374 $(PATH_TARGET)/VBoxNetFlt-src-1.dep
375
376 VBoxNetFlt-sh_INST = bin/src/vboxnetflt/
377 VBoxNetFlt-sh_MODE = a+rx,u+w
378 VBoxNetFlt-sh_SOURCES = \
379 $(PATH_VBoxNetFlt-sh)/build_in_tmp \
380 $(if $(VBOX_OSE),,$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
381 VBoxNetFlt-sh_CLEAN = $(PATH_VBoxNetFlt-sh)/build_in_tmp
382
383
384 includedep $(PATH_TARGET)/VBoxNetFlt-src-1.dep
385 $$(PATH_VBoxNetFlt-src)/Makefile: \
386 $(PATH_SUB_CURRENT)/linux/Makefile \
387 $$(if $$(eq $$(VBoxNetFlt/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
388 | $$(dir $$@)
389 ifndef VBOX_WITH_HARDENING
390 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
391 else
392 $(QUIET)$(CP) -f $< $@
393 endif
394 %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxNetFlt-src-1.dep
395 %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxNetFlt-src-1.dep' 'VBoxNetFlt/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
396
397 # Script needed for building the kernel module
398 $$(PATH_VBoxNetFlt-sh)/build_in_tmp: \
399 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
400 $(VBOX_VERSION_STAMP) \
401 | $$(dir $$@)
402 $(call MSG_TOOL,Creating,,$@)
403 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxnetflt;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
404 $(QUIET)chmod 0755 $@
405
406 # Script needed for building the kernel module
407 $$(PATH_VBoxNetFlt-src)/dkms.conf: \
408 $(PATH_SUB_CURRENT)/linux/dkms.conf \
409 $(VBOX_VERSION_STAMP) \
410 | $$(dir $$@)
411 $(call MSG_TOOL,Creating,,$@)
412 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
413
414endif # linux
415
416# Gross hack for FreeBSD 7, should figure this out properly
417## @todo Properly generate opt_netgraph.h
418ifeq ($(KBUILD_TARGET),freebsd)
419vboxnetflt_DEPS.freebsd += $(PATH_OUT)/opt_netgraph.h
420$(PATH_OUT)/opt_netgraph.h:
421 echo > $(PATH_OUT)/opt_netgraph.h
422
423 #
424 # Install source files for compliation on FreeBSD.
425 # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
426 #
427 include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetflt
428 INSTALLS += VBoxNetFlt-src
429 VBoxNetFlt-src_INST = bin/src/vboxnetflt/
430 VBoxNetFlt-src_MODE = a+r,u+w
431 VBoxNetFlt-src_SOURCES = $(subst ",,$(VBOX_VBOXNETFLT_SOURCES)) #"
432 VBoxNetFlt-src_SOURCES+= \
433 $(PATH_VBoxNetFlt-src)/Makefile
434 VBoxNetFlt-src_CLEAN = \
435 $(PATH_VBoxNetFlt-src)/Makefile \
436
437 $$(PATH_VBoxNetFlt-src)/Makefile: \
438 $(PATH_SUB_CURRENT)/freebsd/Makefile \
439 $$(if $$(eq $$(VBoxNetFlt/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
440 | $$(dir $$@)
441 ifndef VBOX_WITH_HARDENING
442 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
443 else
444 $(QUIET)$(CP) -f $< $@
445 endif
446endif # freebsd
447
448include $(KBUILD_PATH)/subfooter.kmk
449
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