VirtualBox

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

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

win/NetFlt: sources splitted to several files, protocol-based approach fixes

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