VirtualBox

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

Last change on this file since 13033 was 12974, checked in by vboxsync, 16 years ago

protocol-based approach fixes

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