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 |
|
---|
22 | SUB_DEPTH = ../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 |
|
---|
26 | if1of ($(KBUILD_TARGET), darwin win) # this ifeq must go, see @todo around elif
|
---|
27 | #
|
---|
28 | # VBoxNetFlt.sys - The mixed case driver.
|
---|
29 | #
|
---|
30 | SYSMODS += VBoxNetFlt
|
---|
31 | VBoxNetFlt_TEMPLATE = VBOXR0DRV
|
---|
32 | VBoxNetFlt_INST = $(INST_VBOXNETFLT)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
|
---|
33 | if defined(VBOX_SIGNING_MODE) && "$(KBUILD_TARGET)" == "win"
|
---|
34 | VBoxNetFlt_NOINST = true
|
---|
35 | endif
|
---|
36 | VBoxNetFlt_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
37 | VBoxNetFlt_SDKS.win = W2K3DDK WINPSDKINCS
|
---|
38 | VBoxNetFlt_INCS = .
|
---|
39 | VBoxNetFlt_SOURCES.darwin = \
|
---|
40 | darwin/VBoxNetFlt-darwin.cpp
|
---|
41 | #VBoxNetFlt_SOURCES.darwin += \
|
---|
42 | # darwin/VBoxNetAdapter-darwin.cpp
|
---|
43 | VBoxNetFlt_SOURCES.win = \
|
---|
44 | win/VBoxNetFlt-win.c \
|
---|
45 | win/VBoxNetFltPt-win.c \
|
---|
46 | win/VBoxNetFlt-win.rc
|
---|
47 | ifdef VBOX_NETFLT_ONDEMAND_BIND
|
---|
48 | VBoxNetFlt_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
|
---|
49 | else
|
---|
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
|
---|
54 | endif
|
---|
55 | ifdef VBOX_LOOPBACK_USEFLAGS
|
---|
56 | VBoxNetFlt_DEFS.win += VBOX_LOOPBACK_USEFLAGS
|
---|
57 | endif
|
---|
58 | VBoxNetFlt_SOURCES = VBoxNetFlt.c
|
---|
59 | #VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
|
---|
60 | VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
61 | VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
62 | VBoxNetFlt_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)
|
---|
67 | VBoxNetFlt_LIBS = \
|
---|
68 | $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
69 |
|
---|
70 | darwin/VBoxNetFlt-darwin.cpp_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
71 |
|
---|
72 |
|
---|
73 | # Darwin extras.
|
---|
74 | ifeq ($(KBUILD_TARGET),darwin)
|
---|
75 | INSTALLS += VBoxNetFlt.kext
|
---|
76 | VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
|
---|
77 | VBoxNetFlt.kext_SOURCES = \
|
---|
78 | $(PATH_VBoxNetFlt.kext)/Info.plist
|
---|
79 | VBoxNetFlt.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 |
|
---|
93 | INSTALLS.darwin += Scripts-darwin
|
---|
94 | Scripts-darwin_INST = $(INST_DIST)
|
---|
95 | Scripts-darwin_SOURCES = \
|
---|
96 | darwin/loadnetflt.sh
|
---|
97 | endif # darwin
|
---|
98 |
|
---|
99 |
|
---|
100 | ifeq ($(KBUILD_TARGET),win)
|
---|
101 | #
|
---|
102 | # Windows extras.
|
---|
103 | #
|
---|
104 | INSTALLS.win += VBoxNetFlt-inf
|
---|
105 | VBoxNetFlt-inf_INST = $(INST_BIN)
|
---|
106 | VBoxNetFlt-inf_MODE = a+r,u+w
|
---|
107 | VBoxNetFlt-inf_SOURCES = \
|
---|
108 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
|
---|
109 | $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf
|
---|
110 | VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
|
---|
111 | VBoxNetFlt-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
|
---|
122 | VBoxNetFlt-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 | #
|
---|
146 | LIBRARIES.win += WinNetConfig
|
---|
147 | WinNetConfig_TEMPLATE = VBOXR3STATIC
|
---|
148 | WinNetConfig_DEFS = _WIN32_WINNT=0x0501 _UNICODE UNICODE
|
---|
149 | WinNetConfig_SDKS = WINPSDK W2K3DDK
|
---|
150 | WinNetConfig_SOURCES = \
|
---|
151 | win/WinNetConfig.cpp
|
---|
152 | WinNetConfig_INCS.win += $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)
|
---|
153 |
|
---|
154 | #
|
---|
155 | # NetFltInstall
|
---|
156 | #
|
---|
157 | PROGRAMS.win += NetFltInstall
|
---|
158 | NetFltInstall_TEMPLATE = VBOXR3STATIC
|
---|
159 | NetFltInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
160 | NetFltInstall_SOURCES = win/NetFltInstall.cpp
|
---|
161 | NetFltInstall_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 | #
|
---|
169 | PROGRAMS.win += NetFltUninstall
|
---|
170 | NetFltUninstall_TEMPLATE = VBOXR3STATIC
|
---|
171 | NetFltUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
172 | NetFltUninstall_SOURCES = win/NetFltUninstall.cpp
|
---|
173 | NetFltUninstall_LIBS = $(TARGET_WinNetConfig) \
|
---|
174 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
175 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
176 |
|
---|
177 | #
|
---|
178 | # NetAdpInstall
|
---|
179 | #
|
---|
180 | PROGRAMS.win += NetAdpInstall
|
---|
181 | NetAdpInstall_TEMPLATE = VBOXR3STATIC
|
---|
182 | NetAdpInstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
183 | NetAdpInstall_SOURCES = win/NetAdpInstall.cpp
|
---|
184 | NetAdpInstall_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 | #
|
---|
192 | PROGRAMS.win += NetAdpUninstall
|
---|
193 | NetAdpUninstall_TEMPLATE = VBOXR3STATIC
|
---|
194 | NetAdpUninstall_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
195 | NetAdpUninstall_SOURCES = win/NetAdpUninstall.cpp
|
---|
196 | NetAdpUninstall_LIBS = $(TARGET_WinNetConfig) \
|
---|
197 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_LIB)/comsupp.lib \
|
---|
198 | $(PATH_SDK_WINPSDK_LIB)/WbemUuid.Lib
|
---|
199 |
|
---|
200 | #
|
---|
201 | # VBoxNetFltNotify
|
---|
202 | #
|
---|
203 | DLLS.win += VBoxNetFltNotify
|
---|
204 | if defined(VBOX_SIGNING_MODE)
|
---|
205 | VBoxNetFltNotify_NOINST = true
|
---|
206 | endif
|
---|
207 | VBoxNetFltNotify_TEMPLATE = VBOXR3STATIC
|
---|
208 | VBoxNetFltNotify_SDKS = WINPSDK W2K3DDK VBOX_NTDLL
|
---|
209 | VBoxNetFltNotify_DEFS = _WIN32_WINNT=0x0500 WIN32 _ATL_STATIC_REGISTRY
|
---|
210 | VBoxNetFltNotify_INCS = \
|
---|
211 | $(PATH_VBoxNetFltNotify)
|
---|
212 | VBoxNetFltNotify_SOURCES = \
|
---|
213 | win/notifyobj/VBoxNetFltNotify.cpp \
|
---|
214 | win/notifyobj/VBoxNetFltNotify.def \
|
---|
215 | win/notifyobj/VBoxNetFltNotify.rc
|
---|
216 | VBoxNetFltNotify_LIBS = \
|
---|
217 | $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_LIB)/atls$(VBOX_VCC_CRT_TYPE).lib
|
---|
218 | #VBoxNetFltNotify_INTERMEDIATES =
|
---|
219 | VBoxNetFltNotify_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
|
---|
225 | VBoxNetFltNotify_CLEAN = $(VBoxNetFltNotify_DEPS)
|
---|
226 |
|
---|
227 | VBOXNETFLT_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 | #
|
---|
249 | SYSMODS.win += VBoxNetAdp
|
---|
250 | VBoxNetAdp_TEMPLATE = VBOXR0DRV
|
---|
251 | #VBoxNetAdp_INST = $(INST_VBOXNETADP)
|
---|
252 | if defined(VBOX_SIGNING_MODE)
|
---|
253 | VBoxNetAdp_NOINST = true
|
---|
254 | endif
|
---|
255 | VBoxNetAdp_DEFS = IN_RT_R0 IN_SUP_STATIC
|
---|
256 | VBoxNetAdp_SDKS = W2K3DDK WINPSDKINCS
|
---|
257 | VBoxNetAdp_INCS := $(PATH_SUB_CURRENT)
|
---|
258 | VBoxNetAdp_SOURCES = \
|
---|
259 | VBoxNetFlt.c \
|
---|
260 | win/VBoxNetFlt-win.c \
|
---|
261 | win/VBoxNetFltMp-win.c \
|
---|
262 | win/VBoxNetFlt-win.rc
|
---|
263 | VBoxNetAdp_DEFS += VBOXNETFLT_STATIC_CONFIG VBOXNETADP
|
---|
264 | VBoxNetAdp_DEFS += NDIS_MINIPORT_DRIVER NDIS_WDM=1 BINARY_COMPATIBLE=0
|
---|
265 | VBoxNetAdp_DEFS += NDIS50_MINIPORT=1 NDIS50=1
|
---|
266 | VBoxNetAdp_LDFLAGS.win.x86 = -Entry:DriverEntry@8
|
---|
267 | VBoxNetAdp_LDFLAGS.win.amd64 = -Entry:DriverEntry
|
---|
268 | VBoxNetAdp_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)
|
---|
273 | VBoxNetAdp_LIBS = \
|
---|
274 | $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
275 |
|
---|
276 |
|
---|
277 | INSTALLS.win += VBoxNetAdp-inf
|
---|
278 | VBoxNetAdp-inf_INST = $(INST_BIN)
|
---|
279 | VBoxNetAdp-inf_MODE = a+r,u+w
|
---|
280 | VBoxNetAdp-inf_SOURCES = \
|
---|
281 | $(PATH_TARGET)/VBoxNetAdpCat.dir/VBoxNetAdp.inf
|
---|
282 | VBoxNetAdp-inf_CLEAN = $(VBoxNetAdp-inf_SOURCES)
|
---|
283 | VBoxNetAdp-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
|
---|
290 | VBoxNetAdp-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 |
|
---|
305 | endif #ifeq ($(KBUILD_TARGET), win)
|
---|
306 |
|
---|
307 | else 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
|
---|
313 | SYSMODS += vboxnetflt
|
---|
314 | vboxnetflt_TEMPLATE = VBOXR0DRV
|
---|
315 | vboxnetflt_NAME.solaris = vboxflt
|
---|
316 | vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
|
---|
317 | vboxnetflt_DEFS = IN_RT_R0
|
---|
318 | vboxnetflt_DEPS.solaris += $(VBOX_SVN_REV_KMK)
|
---|
319 | vboxnetflt_NOINST.linux = true
|
---|
320 | vboxnetflt_INCS.linux := \
|
---|
321 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
322 | vboxnetflt_INCS := \
|
---|
323 | $(PATH_SUB_CURRENT)
|
---|
324 | vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv
|
---|
325 | ifdef VBOXNETFLT_SOLARIS_USE_NETINFO
|
---|
326 | vboxnetflt_DEFS.solaris += VBOXNETFLT_SOLARIS_USE_NETINFO
|
---|
327 | vboxnetflt_LDFLAGS.solaris += -N misc/neti
|
---|
328 | endif
|
---|
329 | vboxnetflt_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)
|
---|
334 | vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
|
---|
335 | vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
|
---|
336 | vboxnetflt_SOURCES.freebsd = freebsd/VBoxNetFlt-freebsd.c
|
---|
337 | vboxnetflt_SOURCES = VBoxNetFlt.c
|
---|
338 | solaris/VBoxNetFlt-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
339 | ifdef VBOX_WITH_NETFLT_CROSSBOW
|
---|
340 | SYSMODS += vboxnetbow
|
---|
341 | vboxnetbow_TEMPLATE = VBOXR0DRV
|
---|
342 | vboxnetbow_NAME = vboxbow
|
---|
343 | vboxnetbow_DEFS = vboxnetflt_DEFS VBOX_WITH_NETFLT_CROSSBOW
|
---|
344 | vboxnetbow_DEPS += $(VBOX_SVN_REV_KMK)
|
---|
345 | vboxnetbow_INCS := $(PATH_SUB_CURRENT)
|
---|
346 | vboxnetbow_LDFLAGS += -N drv/vboxdrv -N drv/vnic -N misc/mac -N misc/dls
|
---|
347 | vboxnetbow_LIBS = \
|
---|
348 | $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
349 | vboxnetbow_SOURCES.solaris = solaris/VBoxNetFltBow-solaris.c
|
---|
350 | vboxnetbow_SOURCES = VBoxNetFlt.c
|
---|
351 | solaris/VBoxNetFltBow-solaris.c_DEFS = VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
352 | endif # VBOX_WITH_NETFLT_CROSSBOW
|
---|
353 | endif # VBOX_WITH_VBOXDRV
|
---|
354 | endif # to be removed.
|
---|
355 |
|
---|
356 |
|
---|
357 | ifeq ($(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 |
|
---|
414 | endif # linux
|
---|
415 |
|
---|
416 | # Gross hack for FreeBSD 7, should figure this out properly
|
---|
417 | ## @todo Properly generate opt_netgraph.h
|
---|
418 | ifeq ($(KBUILD_TARGET),freebsd)
|
---|
419 | vboxnetflt_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
|
---|
446 | endif # freebsd
|
---|
447 |
|
---|
448 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
449 |
|
---|