VirtualBox

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

最後變更 在這個檔案從13458是 13435,由 vboxsync 提交於 16 年 前

w64 unwind hacking: renamed SUPDRV_WITH_UNWIND_HACK to RT_WITH_W64_UNWIND_HACK, fixed license headers and file properties, and some minor adjustments.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 4.5 KB
 
1# $Id: Makefile.kmk 13435 2008-10-21 12:21:12Z vboxsync $
2## @file
3# Sub-Makefile for the Network Filter Driver (VBoxNetFlt).
4#
5
6#
7# Copyright (C) 2008 Sun Microsystems, Inc.
8#
9# Sun Microsystems, Inc. confidential
10# All rights reserved
11#
12
13SUB_DEPTH = ../../../..
14include $(KBUILD_PATH)/subheader.kmk
15
16
17if1of ($(KBUILD_TARGET), darwin win)
18#
19# VBoxNetFlt.sys - The mixed case driver.
20#
21SYSMODS += VBoxNetFlt
22VBoxNetFlt_TEMPLATE = VBOXR0DRV
23VBoxNetFlt_INST = $(INST_VBOXNETFLT)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
24if defined(VBOX_SIGNING_MODE) && "$(KBUILD_TARGET)" == "win"
25 VBoxNetFlt_NOINST = true
26endif
27VBoxNetFlt_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
28VBoxNetFlt_SDKS.win = W2K3DDK WINPSDKINCS
29VBoxNetFlt_INCS := $(PATH_SUB_CURRENT)
30VBoxNetFlt_SOURCES.darwin = darwin/VBoxNetFlt-darwin.cpp
31VBoxNetFlt_SOURCES.win = win/VBoxNetFlt-win.c win/VBoxNetFlt-win.rc
32ifdef VBOX_NETFLT_ONDEMAND_BIND
33VBoxNetFlt_DEFS.win += VBOX_NETFLT_ONDEMAND_BIND
34endif
35VBoxNetFlt_SOURCES = VBoxNetFlt.c
36VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
37VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
38VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
39VBoxNetFlt_SOURCES.win.amd64 += win/VBoxNetFltA-win.asm
40VBoxNetFlt_DEFS.win.amd64 += RT_WITH_W64_UNWIND_HACK
41VBoxNetFlt_LIBS.win = \
42 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
43 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
44 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
45 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
46VBoxNetFlt_LIBS = \
47 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
48
49
50# Darwin extras.
51ifeq ($(KBUILD_TARGET),darwin)
52INSTALLS += VBoxNetFlt.kext
53VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
54VBoxNetFlt.kext_SOURCES = \
55 $(PATH_VBoxNetFlt.kext)/Info.plist
56VBoxNetFlt.kext_CLEAN = \
57 $(PATH_VBoxNetFlt.kext)/Info.plist
58
59$$(PATH_VBoxNetFlt.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
60 $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
61 $(xQUIET)$(RM) -f $@
62 $(xQUIET)$(SED) \
63 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
64 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
65 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
66 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
67 --output $@ \
68 $<
69
70INSTALLS.darwin += Scripts-darwin
71Scripts-darwin_INST = $(INST_DIST)
72Scripts-darwin_SOURCES = \
73 darwin/loadnetflt.sh
74endif # darwin
75
76
77# Windows extras.
78INSTALLS.win += VBoxNetFlt-inf
79VBoxNetFlt-inf_INST = $(INST_BIN)
80VBoxNetFlt-inf_MODE = a+r,u+w
81VBoxNetFlt-inf_SOURCES = \
82 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
83 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf
84VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
85VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir
86
87$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
88 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
89 $(call VBOX_EDIT_INF_FN,$<,$@)
90
91$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt_m.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
92 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
93 $(call VBOX_EDIT_INF_FN,$<,$@)
94
95 ifdef VBOX_SIGNING_MODE
96VBoxNetFlt-inf_SOURCES += \
97 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
98 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
99
100$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(TARGET_VBoxNetFlt) | $$(dir $$@)
101 $(INSTALL) -m 644 $< $(@D)
102
103$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat: \
104 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
105 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf \
106 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
107 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
108 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
109 endif # signing
110
111
112else if1of ($(KBUILD_TARGET), linux solaris)
113#
114# vboxnetflt(.ko/.o/) - The lower case driver.
115# Note! On Solaris the name has to be <= 8 chars long.
116#
117SYSMODS += vboxnetflt
118vboxnetflt_TEMPLATE = VBOXR0DRV
119vboxnetflt_NAME.solaris = vboxflt
120vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
121vboxnetflt_DEFS = IN_RT_R0
122vboxnetflt_INCS.linux := \
123 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
124vboxnetflt_INCS := \
125 $(PATH_SUB_CURRENT)
126vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv
127vboxnetflt_LIBS = \
128 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
129## @todo vboxflt should resolves all the IPRT bits from vboxdrv.
130vboxnetflt_LIBS += \
131 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
132vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
133vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
134vboxnetflt_SOURCES = VBoxNetFlt.c
135
136endif
137
138include $(KBUILD_PATH)/subfooter.kmk
139
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette