VirtualBox

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

Last change on this file since 12073 was 11982, checked in by vboxsync, 16 years ago

All: license header changes for 2.0 (OSE headers, add Sun GPL/LGPL disclaimer)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# $Id: Makefile.kmk 11982 2008-09-02 13:09:44Z 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
13ifdef VBOX_KBUILD_HACKING
14SUB_DEPTH = ../../../..
15else
16SUB_DEPTH = ..
17DEPTH ?= ../../../..
18endif
19include $(KBUILD_PATH)/subheader.kmk
20
21
22if1of ($(KBUILD_TARGET), darwin win)
23#
24# VBoxNetFlt.sys - The mixed case driver.
25#
26SYSMODS += VBoxNetFlt
27VBoxNetFlt_TEMPLATE = VBOXR0DRV
28VBoxNetFlt_INST = $(INST_VBOXNETFLT)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
29ifdef VBOX_SIGNING_MODE
30 ifeq ($(KBUILD_TARGET),win)
31 VBoxNetFlt_NOINST = true
32 endif
33endif
34VBoxNetFlt_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
35VBoxNetFlt_SDKS.win = W2K3DDK WINPSDKINCS
36VBoxNetFlt_INCS := $(PATH_SUB_CURRENT)
37VBoxNetFlt_SOURCES.darwin = darwin/VBoxNetFlt-darwin.cpp
38VBoxNetFlt_SOURCES.win = win/VBoxNetFlt-win.c win/VBoxNetFlt-win.rc
39VBoxNetFlt_SOURCES = VBoxNetFlt.c
40VBoxNetFlt_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
41VBoxNetFlt_LDFLAGS.win.x86 = -Entry:DriverEntry@8
42VBoxNetFlt_LDFLAGS.win.amd64 = -Entry:DriverEntry
43VBoxNetFlt_LIBS.win = \
44 $(PATH_SDK_W2K3DDK_LIB)/ntoskrnl.lib \
45 $(PATH_SDK_W2K3DDK_LIB)/hal.lib \
46 $(PATH_SDK_W2K3DDK_LIB)/ndis.lib \
47 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
48VBoxNetFlt_LIBS = \
49 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
50
51
52# Darwin extras.
53INSTALLS.darwin += VBoxNetFlt.kext
54VBoxNetFlt.kext_INST = $(INST_VBOXNETFLT)Contents/
55VBoxNetFlt.kext_SOURCES = \
56 $(PATH_TARGET)/VBoxNetFlt/Info.plist
57VBoxNetFlt.kext_CLEAN = \
58 $(PATH_TARGET)/VBoxNetFlt/Info.plist
59
60$(PATH_TARGET)/VBoxNetFlt/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $(call DIRDEP,$(PATH_TARGET)/VBoxNetFlt)
61 $(call MSG_GENERATE,VBoxNetFlt,$@,$<)
62 $(xQUIET)$(RM) -f $@
63 $(xQUIET)$(SED) \
64 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
65 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
66 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
67 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
68 $< > $@
69
70INSTALLS.darwin += Scripts-darwin
71Scripts-darwin_INST = $(INST_DIST)
72Scripts-darwin_SOURCES = \
73 darwin/loadnetflt.sh
74
75
76# Windows extras.
77INSTALLS.win += VBoxNetFlt-inf
78VBoxNetFlt-inf_INST = $(INST_BIN)
79VBoxNetFlt-inf_MODE = a+r,u+w
80VBoxNetFlt-inf_SOURCES = \
81 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf \
82 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf
83VBoxNetFlt-inf_CLEAN = $(VBoxNetFlt-inf_SOURCES)
84VBoxNetFlt-inf_BLDDIRS = $(PATH_TARGET)/VBoxNetFltCat.dir
85
86$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt.inf $(MAKEFILE_CURRENT) | $$(call DIRDEP,$$(@D))
87 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
88 $(call VBOX_EDIT_INF_FN,$<,$@)
89
90$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt_m.inf: $(PATH_SUB_CURRENT)/win/VBoxNetFlt_m.inf $(MAKEFILE_CURRENT) | $$(call DIRDEP,$$(@D))
91 $(call MSG_GENERATE,VBoxNetFlt-inf,$@,$<)
92 $(call VBOX_EDIT_INF_FN,$<,$@)
93
94 ifdef VBOX_SIGNING_MODE
95VBoxNetFlt-inf_SOURCES += \
96 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys \
97 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat
98
99$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.sys: $$(TARGET_VBoxNetFlt) | $$(call DIRDEP,$$(@D))
100 $(INSTALL) -m 644 $< $(@D)
101
102$(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.cat: \
103 $(PATH_TARGET)/VBoxNetFltCat.dir/VBoxNetFlt.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)
127if1of ($(KBUILD_TARGET),solaris) ## @todo vboxflt should resolve all the IPRT bits from vboxdrv.
128vboxnetflt_LIBS += \
129 $(PATH_LIB)/RuntimeR0Drv$(VBOX_SUFF_LIB)
130endif
131vboxnetflt_SOURCES.linux = linux/VBoxNetFlt-linux.c
132vboxnetflt_SOURCES.solaris = solaris/VBoxNetFlt-solaris.c
133vboxnetflt_SOURCES = VBoxNetFlt.c
134
135endif
136
137include $(KBUILD_PATH)/subfooter.kmk
138
139
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