VirtualBox

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

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

code style fixes, strtup/shutdown fixes, integration with installer script

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 4.3 KB
 
1# $Id: Makefile.kmk 12313 2008-09-09 16:52:54Z 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
32VBoxNetFlt_SOURCES = VBoxNetFlt.c
33VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
34VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
35VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
36VBoxNetFlt_LIBS.win = \
37 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
38 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
39 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
40 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
41VBoxNetFlt_LIBS = \
42 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
43
44
45# Darwin extras.
46ifeq ($(KBUILD_TARGET),darwin)
47INSTALLS += VBoxNetFlt.kext
48VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
49VBoxNetFlt.kext_SOURCES = \
50 $(PATH_VBoxNetFlt.kext)/Info.plist
51VBoxNetFlt.kext_CLEAN = \
52 $(PATH_VBoxNetFlt.kext)/Info.plist
53
54$$(PATH_VBoxNetFlt.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
55 $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
56 $(xQUIET)$(RM) -f $@
57 $(xQUIET)$(SED) \
58 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
59 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
60 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
61 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
62 --output $@ \
63 $<
64
65INSTALLS.darwin += Scripts-darwin
66Scripts-darwin_INST = $(INST_DIST)
67Scripts-darwin_SOURCES = \
68 darwin/loadnetflt.sh
69endif # darwin
70
71
72# Windows extras.
73INSTALLS.win += VBoxNetFlt-inf
74VBoxNetFlt-inf_INST = $(INST_BIN)
75VBoxNetFlt-inf_MODE = a+r,u+w
76VBoxNetFlt-inf_SOURCES = \
77 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
78 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf
79VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
80VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir
81
82$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
83 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
84 $(call VBOX_EDIT_INF_FN,$<,$@)
85
86$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt_m.inf $(MAKEFILE_CURRENT) | $$(dir $$@)
87 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
88 $(call VBOX_EDIT_INF_FN,$<,$@)
89
90 ifdef VBOX_SIGNING_MODE
91VBoxNetFlt-inf_SOURCES += \
92 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
93 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
94
95$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(TARGET_VBoxNetFlt) | $$(dir $$@)
96 $(INSTALL) -m 644 $< $(@D)
97
98$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat: \
99 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
100 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf \
101 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
102 $(call MSG_TOOL,Inf2Cat,VBoxNetFlt-inf,$@,$<)
103 $(call VBOX_MAKE_CAT_FN, $(@D),$@)
104 endif # signing
105
106
107else if1of ($(KBUILD_TARGET), linux solaris)
108#
109# vboxnetflt(.ko/.o/) - The lower case driver.
110# Note! On Solaris the name has to be <= 8 chars long.
111#
112SYSMODS += vboxnetflt
113vboxnetflt_TEMPLATE = VBOXR0DRV
114vboxnetflt_NAME.solaris = vboxflt
115vboxnetflt_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) KBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) MODULE
116vboxnetflt_DEFS = IN_RT_R0
117vboxnetflt_INCS.linux := \
118 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
119vboxnetflt_INCS := \
120 $(PATH_SUB_CURRENT)
121vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv
122vboxnetflt_LIBS = \
123 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
124if1of ($(KBUILD_TARGET),solaris) ## @todo vboxflt should resolve all the IPRT bits from vboxdrv.
125vboxnetflt_LIBS += \
126 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
127endif
128vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
129vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
130vboxnetflt_SOURCES = VBoxNetFlt.c
131
132endif
133
134include $(KBUILD_PATH)/subfooter.kmk
135
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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