1 | # $Id: Makefile.kmk 38183 2011-07-26 13:20:51Z 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 |
|
---|
18 | SUB_DEPTH = ../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 |
|
---|
22 | if1of ($(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 | if defined(VBOX_SIGNING_MODE) && "$(KBUILD_TARGET)" == "win"
|
---|
30 | VBoxNetFlt_NOINST = true
|
---|
31 | endif
|
---|
32 | VBoxNetFlt_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
33 | VBoxNetFlt_INCS = .
|
---|
34 | VBoxNetFlt_SOURCES.darwin = \
|
---|
35 | darwin/VBoxNetFlt-darwin.cpp
|
---|
36 | VBoxNetFlt_SDKS.win = WINDDKWLH WINPSDKINCS
|
---|
37 | VBoxNetFlt_SOURCES.win = \
|
---|
38 | win/drv/VBoxNetFltP-win.cpp \
|
---|
39 | win/drv/VBoxNetFltM-win.cpp \
|
---|
40 | win/drv/VBoxNetFltRt-win.cpp \
|
---|
41 | win/drv/VBoxNetFlt-win.rc
|
---|
42 | # with WINDDKWLH the WIN9X_COMPAT_SPINLOCK is needed to avoid inline declaration of KeInitializeSpinLock
|
---|
43 | # otherwise the linker would complain about dumplicate _KeInitializeSpinLock@4 definition
|
---|
44 | # in ntoskrnl.lib and our object files
|
---|
45 | VBoxNetFlt_DEFS.win += WIN9X_COMPAT_SPINLOCK=1
|
---|
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 | ifdef VBOX_LOOPBACK_USEFLAGS
|
---|
51 | VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS
|
---|
52 | endif
|
---|
53 | VBoxNetFlt_SOURCES = VBoxNetFlt.c
|
---|
54 | #VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
55 | VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
56 | VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
57 | VBoxNetFlt_LIBS.win = \
|
---|
58 | $(PATH_SDK_WINDDKWLH_LIB)/ntoskrnl.lib \
|
---|
59 | $(PATH_SDK_WINDDKWLH_LIB)/hal.lib \
|
---|
60 | $(PATH_SDK_WINDDKWLH_LIB)/ndis.lib \
|
---|
61 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
62 | VBoxNetFlt_LIBS = \
|
---|
63 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
64 |
|
---|
65 | darwin/VBoxNetFlt-darwin.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
66 |
|
---|
67 |
|
---|
68 | # Darwin extras.
|
---|
69 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
70 | INSTALLS += VBoxNetFlt.kext
|
---|
71 | VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
|
---|
72 | VBoxNetFlt.kext_SOURCES = \
|
---|
73 | $(VBoxNetFlt.kext_0_OUTDIR)/Info.plist
|
---|
74 | VBoxNetFlt.kext_CLEAN = \
|
---|
75 | $(VBoxNetFlt.kext_0_OUTDIR)/Info.plist
|
---|
76 |
|
---|
77 | $$(VBoxNetFlt.kext_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
|
---|
78 | $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
|
---|
79 | $(QUIET)$(RM) -f $@
|
---|
80 | $(QUIET)$(SED) \
|
---|
81 | -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
|
---|
82 | -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
|
---|
83 | -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
|
---|
84 | -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
|
---|
85 | -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
|
---|
86 | -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
|
---|
87 | -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
|
---|
88 | --output $@ \
|
---|
89 | $<
|
---|
90 |
|
---|
91 | INSTALLS.darwin += Scripts-darwin
|
---|
92 | Scripts-darwin_INST = $(INST_DIST)
|
---|
93 | Scripts-darwin_EXEC_SOURCES = \
|
---|
94 | darwin/loadnetflt.sh
|
---|
95 | endif # darwin
|
---|
96 |
|
---|
97 |
|
---|
98 | ifeq ($(KBUILD_TARGET),win)
|
---|
99 | #
|
---|
100 | # Windows extras.
|
---|
101 | #
|
---|
102 | INSTALLS.win += VBoxNetFlt-inf
|
---|
103 | VBoxNetFlt-inf_INST = $(INST_BIN)
|
---|
104 | VBoxNetFlt-inf_SOURCES = \
|
---|
105 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
|
---|
106 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf
|
---|
107 | VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
|
---|
108 | VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir
|
---|
109 |
|
---|
110 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
111 | $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
|
---|
112 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
113 |
|
---|
114 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetFltM.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
115 | $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
|
---|
116 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
117 |
|
---|
118 | ifdef VBOX_SIGNING_MODE
|
---|
119 | VBoxNetFlt-inf_SOURCES += \
|
---|
120 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
|
---|
121 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll \
|
---|
122 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
|
---|
123 |
|
---|
124 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(VBoxNetFlt_1_TARGET) | $$(dir $$@)
|
---|
125 | $(INSTALL) -m 644 $< $(@D)
|
---|
126 |
|
---|
127 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltNobj.dll: $$(VBoxNetFltNobj_1_TARGET) | $$(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/VBoxNetFltNobj.dll \
|
---|
133 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
|
---|
134 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFltM.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 | #
|
---|
143 | LIBRARIES.win += WinNetConfig
|
---|
144 | WinNetConfig_TEMPLATE = VBOXR3STATIC
|
---|
145 | WinNetConfig_DEFS = _WIN32_WINNT=0x0501 _UNICODE UNICODE
|
---|
146 | WinNetConfig_SDKS = WINPSDK W2K3DDK
|
---|
147 | WinNetConfig_SOURCES = \
|
---|
148 | win/cfg/VBoxNetCfg.cpp
|
---|
149 | WinNetConfig_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
|
---|
150 |
|
---|
151 | #
|
---|
152 | # NetFltInstall
|
---|
153 | #
|
---|
154 | PROGRAMS.win += NetFltInstall
|
---|
155 | NetFltInstall_TEMPLATE = VBOXR3STATIC
|
---|
156 | NetFltInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
157 | NetFltInstall_SOURCES = win/tools/VBoxNetFltInstall.cpp
|
---|
158 | NetFltInstall_LIBS = \
|
---|
159 | $(WinNetConfig_1_TARGET) \
|
---|
160 | $(VBoxDrvCfg_1_TARGET) \
|
---|
161 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
162 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
163 |
|
---|
164 |
|
---|
165 | #
|
---|
166 | # NetFltUninstall
|
---|
167 | #
|
---|
168 | PROGRAMS.win += NetFltUninstall
|
---|
169 | NetFltUninstall_TEMPLATE = VBOXR3STATIC
|
---|
170 | NetFltUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
171 | NetFltUninstall_SOURCES = win/tools/VBoxNetFltUninstall.cpp
|
---|
172 | NetFltUninstall_LIBS = \
|
---|
173 | $(WinNetConfig_1_TARGET) \
|
---|
174 | $(VBoxDrvCfg_1_TARGET) \
|
---|
175 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
176 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
177 |
|
---|
178 | #
|
---|
179 | # NetAdpInstall
|
---|
180 | #
|
---|
181 | PROGRAMS.win += NetAdpInstall
|
---|
182 | NetAdpInstall_TEMPLATE = VBOXR3STATIC
|
---|
183 | NetAdpInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
184 | NetAdpInstall_SOURCES = win/tools/VBoxNetAdpInstall.cpp
|
---|
185 | NetAdpInstall_LIBS = \
|
---|
186 | $(WinNetConfig_1_TARGET) \
|
---|
187 | $(VBoxDrvCfg_1_TARGET) \
|
---|
188 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
189 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
190 |
|
---|
191 |
|
---|
192 | #
|
---|
193 | # NetAdpUninstall
|
---|
194 | #
|
---|
195 | PROGRAMS.win += NetAdpUninstall
|
---|
196 | NetAdpUninstall_TEMPLATE = VBOXR3STATIC
|
---|
197 | NetAdpUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
198 | NetAdpUninstall_SOURCES = win/tools/VBoxNetAdpUninstall.cpp
|
---|
199 | NetAdpUninstall_LIBS = \
|
---|
200 | $(WinNetConfig_1_TARGET) \
|
---|
201 | $(VBoxDrvCfg_1_TARGET) \
|
---|
202 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
203 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
204 |
|
---|
205 | #
|
---|
206 | # VBoxNetFltNobj
|
---|
207 | #
|
---|
208 | DLLS.win += VBoxNetFltNobj
|
---|
209 | VBoxNetFltNobj_TEMPLATE = VBOXR3STATIC
|
---|
210 | if defined(VBOX_SIGNING_MODE)
|
---|
211 | VBoxNetFltNobj_NOINST = true
|
---|
212 | endif
|
---|
213 | VBoxNetFltNobj_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
214 | VBoxNetFltNobj_DEFS = _WIN32_WINNT=0x0500 WIN32 _ATL_STATIC_REGISTRY
|
---|
215 | VBoxNetFltNobj_INCS = \
|
---|
216 | $(VBoxNetFltNobj_0_OUTDIR)
|
---|
217 | VBoxNetFltNobj_SOURCES = \
|
---|
218 | win/nobj/VBoxNetFltNobj.cpp \
|
---|
219 | win/nobj/VBoxNetFltNobj.def \
|
---|
220 | win/nobj/VBoxNetFltNobj.rc
|
---|
221 | VBoxNetFltNobj_LIBS = \
|
---|
222 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib
|
---|
223 | #VBoxNetFltNobj_INTERMEDIATES =
|
---|
224 | VBoxNetFltNobj_DEPS = \
|
---|
225 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c \
|
---|
226 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c \
|
---|
227 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h \
|
---|
228 | $(VBoxNetFltNobj_0_OUTDIR)/dlldata.c \
|
---|
229 | $(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.tlb
|
---|
230 | VBoxNetFltNobj_CLEAN = $(VBoxNetFltNobj_DEPS)
|
---|
231 |
|
---|
232 | VBOXNETFLT_NOBJ_IDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard \
|
---|
233 | $(PATH_SDK_WINPSDK_BIN)/Midl.Exe\
|
---|
234 | $(PATH_SDK_WINPSDK)/Bin/Midl.Exe\
|
---|
235 | $(PATH_DEVTOOLS)/win.x86/bin/midl.exe\
|
---|
236 | ) Sorry_Cannot_Find_The_Midl_Compiler_In_The_PSDK))
|
---|
237 |
|
---|
238 | $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c \
|
---|
239 | + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c \
|
---|
240 | + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h \
|
---|
241 | + $$(VBoxNetFltNobj_0_OUTDIR)/dlldata.c \
|
---|
242 | + $$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.tlb: \
|
---|
243 | $(PATH_SUB_CURRENT)/win/nobj/VBoxNetFltNobjT.idl \
|
---|
244 | | $$(dir $$@)
|
---|
245 | $(VBOXNETFLT_NOBJ_IDL) /nologo \
|
---|
246 | /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxNetFltNobj_0_OUTDIR)) \
|
---|
247 | /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
|
---|
248 | $(addprefix /I , $(call VBOX_FN_MAKE_WIN_PATH,$(SDK_W2K3DDK_INCS))) \
|
---|
249 | $(call VBOX_FN_MAKE_WIN_PATH,$<)
|
---|
250 |
|
---|
251 | #
|
---|
252 | # VBoxNetAdp.sys - The VirtualBox Adapter miniport driver.
|
---|
253 | #
|
---|
254 | SYSMODS.win += VBoxNetAdp
|
---|
255 | VBoxNetAdp_TEMPLATE = VBOXR0DRV
|
---|
256 | #VBoxNetAdp_INST = $(INST_VBOXNETADP)
|
---|
257 | if defined(VBOX_SIGNING_MODE)
|
---|
258 | VBoxNetAdp_NOINST = true
|
---|
259 | endif
|
---|
260 | VBoxNetAdp_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
261 | VBoxNetAdp_INCS := $(PATH_SUB_CURRENT)
|
---|
262 | VBoxNetAdp_SDKS = WINDDKWLH WINPSDKINCS
|
---|
263 | VBoxNetAdp_SOURCES = \
|
---|
264 | VBoxNetFlt.c \
|
---|
265 | win/drv/VBoxNetFltM-win.cpp \
|
---|
266 | win/drv/VBoxNetFltRt-win.cpp \
|
---|
267 | win/drv/VBoxNetFlt-win.rc
|
---|
268 | VBoxNetAdp_DEFS += VBOXNETFLT_STATIC_CONFIG VBOXNETADP
|
---|
269 | VBoxNetAdp_DEFS.win += VBOXNETFLT_NO_PACKET_QUEUE
|
---|
270 | VBoxNetAdp_DEFS += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
|
---|
271 | VBoxNetAdp_DEFS += NDIS50_MINIPORT=1 NDIS50=1
|
---|
272 | VBoxNetAdp_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
273 | VBoxNetAdp_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
274 | VBoxNetAdp_LIBS.win = \
|
---|
275 | $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
|
---|
276 | $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
|
---|
277 | $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
|
---|
278 | $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
279 | VBoxNetAdp_LIBS = \
|
---|
280 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
281 |
|
---|
282 |
|
---|
283 | INSTALLS.win += VBoxNetAdp-inf
|
---|
284 | VBoxNetAdp-inf_INST = $(INST_BIN)
|
---|
285 | VBoxNetAdp-inf_MODE = a+r,u+w
|
---|
286 | VBoxNetAdp-inf_SOURCES = \
|
---|
287 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
|
---|
288 | VBoxNetAdp-inf_CLEAN = $(VBoxNetAdp-inf_SOURCES)
|
---|
289 | VBoxNetAdp-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetAdpCat.dir
|
---|
290 |
|
---|
291 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf: $(PATH_SUB_CURRENT)/win/drv/VBoxNetAdp.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
|
---|
292 | $(call MSG_GENERATE,VBoxNetAdp-inf,$@,$<)
|
---|
293 | $(call VBOX_EDIT_INF_FN,$<,$@)
|
---|
294 |
|
---|
295 | ifdef VBOX_SIGNING_MODE
|
---|
296 | VBoxNetAdp-inf_SOURCES += \
|
---|
297 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
|
---|
298 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat
|
---|
299 |
|
---|
300 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys: $$(VBoxNetAdp_1_TARGET) | $$(dir $$@)
|
---|
301 | $(INSTALL) -m 644 $< $(@D)
|
---|
302 |
|
---|
303 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.cat: \
|
---|
304 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.sys \
|
---|
305 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
|
---|
306 | $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
|
---|
307 | $(call VBOX_MAKE_CAT_FN, $(@D),$@)
|
---|
308 |
|
---|
309 | endif # ifdef VBOX_SIGNING_MODE
|
---|
310 |
|
---|
311 | endif #ifeq ($(KBUILD_TARGET), win)
|
---|
312 |
|
---|
313 | else if1of ($(KBUILD_TARGET), linux solaris freebsd) ## @todo merge this with the mixed case stuff.
|
---|
314 | #
|
---|
315 | # vboxnetflt(.ko/.o/) - The lower case driver.
|
---|
316 | # Note! On Solaris the name has to be <= 8 chars long.
|
---|
317 | #
|
---|
318 | ifdef VBOX_WITH_VBOXDRV
|
---|
319 | SYSMODS += vboxnetflt
|
---|
320 | vboxnetflt_TEMPLATE = VBOXR0DRV
|
---|
321 | vboxnetflt_NAME.solaris = vboxflt
|
---|
322 | vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
|
---|
323 | vboxnetflt_DEFS = IN_RT_R0
|
---|
324 | vboxnetflt_DEPS.solaris += $(VBOX_SVN_REV_KMK)
|
---|
325 | vboxnetflt_NOINST.linux = true
|
---|
326 | vboxnetflt_INCS.linux := \
|
---|
327 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
328 | vboxnetflt_INCS := \
|
---|
329 | $(PATH_SUB_CURRENT)
|
---|
330 | vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv -N misc/ctf
|
---|
331 | vboxnetflt_LIBS = \
|
---|
332 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
333 | ## @todo vboxflt should resolves all the IPRT bits from vboxdrv.
|
---|
334 | #vboxnetflt_LIBS += \
|
---|
335 | # $(PATH_STAGE_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
|
---|
336 | vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
|
---|
337 | vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
|
---|
338 | vboxnetflt_SOURCES.freebsd = freebsd/VBoxNetFlt-freebsd.c
|
---|
339 | vboxnetflt_SOURCES = VBoxNetFlt.c
|
---|
340 | solaris/VBoxNetFlt-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
341 |
|
---|
342 | ifdef VBOX_WITH_NETFLT_CROSSBOW
|
---|
343 | SYSMODS += vboxnetbow
|
---|
344 | vboxnetbow_TEMPLATE = VBOXR0DRV
|
---|
345 | vboxnetbow_NAME = vboxbow
|
---|
346 | vboxnetbow_DEFS = vboxnetflt_DEFS VBOX_WITH_NETFLT_CROSSBOW
|
---|
347 | vboxnetbow_INCS := $(PATH_SUB_CURRENT)
|
---|
348 | vboxnetbow_LDFLAGS += -N drv/vboxdrv -N drv/vnic -N misc/mac -N misc/dls
|
---|
349 | vboxnetbow_LIBS = \
|
---|
350 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
351 | vboxnetbow_SOURCES.solaris = solaris/VBoxNetFltBow-solaris.c
|
---|
352 | vboxnetbow_SOURCES = VBoxNetFlt.c
|
---|
353 | solaris/VBoxNetFltBow-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
354 | endif # VBOX_WITH_NETFLT_CROSSBOW
|
---|
355 | endif # VBOX_WITH_VBOXDRV
|
---|
356 | endif # to be removed.
|
---|
357 |
|
---|
358 |
|
---|
359 | ifeq ($(KBUILD_TARGET),linux)
|
---|
360 | #
|
---|
361 | # Install source files for compilation on Linux.
|
---|
362 | # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
|
---|
363 | #
|
---|
364 | include $(PATH_SUB_CURRENT)/linux/files_vboxnetflt
|
---|
365 | INSTALLS += VBoxNetFlt-src VBoxNetFlt-sh
|
---|
366 | VBoxNetFlt-src_INST = bin/src/vboxnetflt/
|
---|
367 | VBoxNetFlt-src_SOURCES = \
|
---|
368 | $(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES)) \
|
---|
369 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile
|
---|
370 | VBoxNetFlt-src_EXEC_SOURCES = \
|
---|
371 | $(VBoxNetFlt-src_0_OUTDIR)/build_in_tmp \
|
---|
372 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
|
---|
373 | VBoxNetFlt-src_CLEAN = \
|
---|
374 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile \
|
---|
375 | $(PATH_TARGET)/VBoxNetFlt-src-1.dep \
|
---|
376 | $(VBoxNetFlt-src_0_OUTDIR)/build_in_tmp
|
---|
377 |
|
---|
378 | # Scripts needed for building the kernel module.
|
---|
379 |
|
---|
380 | includedep $(PATH_TARGET)/VBoxNetFlt-src-1.dep
|
---|
381 | $$(VBoxNetFlt-src_0_OUTDIR)/Makefile: \
|
---|
382 | $(PATH_SUB_CURRENT)/linux/Makefile \
|
---|
383 | $$(if $$(eq $$(VBoxNetFlt/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
384 | | $$(dir $$@)
|
---|
385 | $(QUIET)$(RM) -f -- $@
|
---|
386 | ifndef VBOX_WITH_HARDENING
|
---|
387 | $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
|
---|
388 | else
|
---|
389 | $(QUIET)$(CP) -f $< $@
|
---|
390 | endif
|
---|
391 | %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxNetFlt-src-1.dep
|
---|
392 | %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxNetFlt-src-1.dep' 'VBoxNetFlt/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
|
---|
393 |
|
---|
394 | $$(VBoxNetFlt-src_0_OUTDIR)/build_in_tmp: \
|
---|
395 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
|
---|
396 | $(VBOX_VERSION_STAMP) \
|
---|
397 | | $$(dir $$@)
|
---|
398 | $(call MSG_TOOL,Creating,,$@)
|
---|
399 | $(QUIET)$(RM) -f -- $@
|
---|
400 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxnetflt;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
|
---|
401 | $(QUIET)$(CHMOD) 0755 $@
|
---|
402 |
|
---|
403 | endif # linux
|
---|
404 |
|
---|
405 | # Gross hack for FreeBSD 7, should figure this out properly
|
---|
406 | ## @todo Properly generate opt_netgraph.h
|
---|
407 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
408 | vboxnetflt_DEPS.freebsd += $(PATH_OUT)/opt_netgraph.h
|
---|
409 | $(PATH_OUT)/opt_netgraph.h:
|
---|
410 | echo > $(PATH_OUT)/opt_netgraph.h
|
---|
411 |
|
---|
412 | #
|
---|
413 | # Install source files for compilation on FreeBSD.
|
---|
414 | # files_vboxnetflt defines VBOX_VBOXNETFLT_SOURCES.
|
---|
415 | #
|
---|
416 | include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetflt
|
---|
417 | INSTALLS += VBoxNetFlt-src
|
---|
418 | VBoxNetFlt-src_INST = bin/src/vboxnetflt/
|
---|
419 | VBoxNetFlt-src_SOURCES = \
|
---|
420 | $(subst $(DQUOTE),,$(VBOX_VBOXNETFLT_SOURCES)) \
|
---|
421 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile
|
---|
422 | VBoxNetFlt-src_CLEAN = \
|
---|
423 | $(VBoxNetFlt-src_0_OUTDIR)/Makefile \
|
---|
424 |
|
---|
425 | $$(VBoxNetFlt-src_0_OUTDIR)/Makefile: \
|
---|
426 | $(PATH_SUB_CURRENT)/freebsd/Makefile \
|
---|
427 | $$(if $$(eq $$(VBoxNetFlt/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
428 | | $$(dir $$@)
|
---|
429 | $(QUIET)$(RM) -f -- $@
|
---|
430 | $(QUIET)$(CP) -f $< $@
|
---|
431 | ifndef VBOX_WITH_HARDENING
|
---|
432 | $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output [email protected] $@
|
---|
433 | ${QUIET}$(MV) -f [email protected] $@
|
---|
434 | endif
|
---|
435 | ifndef VBOX_WITH_NETFLT_VIMAGE
|
---|
436 | $(QUIET)$(SED) -e "s;-DVIMAGE;;g" --output [email protected] $@
|
---|
437 | ${QUIET}$(MV) -f [email protected] $@
|
---|
438 | endif
|
---|
439 | endif # freebsd
|
---|
440 |
|
---|
441 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
442 |
|
---|