VirtualBox

source: vbox/trunk/src/VBox/HostDrivers/VBoxNetAdp/Makefile.kmk@ 49736

Last change on this file since 49736 was 41477, checked in by vboxsync, 13 years ago

/Makefile.kmk: Cosmetic changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.1 KB
Line 
1# $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z vboxsync $
2## @file
3# Sub-Makefile for the Network Adapter Driver (VBoxNetAdp).
4#
5
6#
7# Copyright (C) 2009-2012 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21if1of ($(KBUILD_TARGET), solaris darwin linux freebsd)
22 #
23 # VBoxNetAdp - Virtual Network Adapter
24 # Note! On Solaris the name has to be <= 8 chars long.
25 #
26 ifdef VBOX_WITH_VBOXDRV
27 SYSMODS += VBoxNetAdp
28 VBoxNetAdp_TEMPLATE = VBOXR0DRV
29 VBoxNetAdp_INST = $(INST_VBOXNETADP)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
30 VBoxNetAdp_DEBUG_INST.darwin= $(patsubst %/,%,$(INST_VBOXNETADP))
31 VBoxNetAdp_NAME.solaris = vboxnet
32 VBoxNetAdp_NAME.linux = vboxnetadp
33 VBoxNetAdp_NAME.freebsd = vboxnetadp
34 VBoxNetAdp_DEPS.solaris += $(VBOX_SVN_REV_KMK)
35 VBoxNetAdp_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
36 VBoxNetAdp_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetadp\) KBUILD_BASENAME=KBUILD_STR\(vboxnetadp\) MODULE
37 #VBoxNetAdp_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
38 VBoxNetAdp_LDFLAGS.solaris += -N misc/gld -N drv/vboxdrv
39 VBoxNetAdp_INCS.linux := \
40 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
41 VBoxNetAdp_INCS = \
42 .
43 VBoxNetAdp_SOURCES.darwin = \
44 darwin/VBoxNetAdp-darwin.cpp \
45 VBoxNetAdp.c
46 VBoxNetAdp_SOURCES.solaris = \
47 solaris/VBoxNetAdp-solaris.c
48 VBoxNetAdp_SOURCES.linux = \
49 linux/VBoxNetAdp-linux.c \
50 VBoxNetAdp.c
51 VBoxNetAdp_SOURCES.freebsd = \
52 freebsd/VBoxNetAdp-freebsd.c \
53 VBoxNetAdp.c
54 VBoxNetAdp_SOURCES =
55 #VBoxNetAdp_SOURCES = \
56 # VBoxNetAdp.c
57 VBoxNetAdp_LIBS += \
58 $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
59 endif
60endif
61
62#
63# Darwin extras.
64#
65ifeq ($(KBUILD_TARGET),darwin)
66 INSTALLS += VBoxNetAdp.kext
67 VBoxNetAdp.kext_INST = $(INST_VBOXNETADP)Contents/
68 VBoxNetAdp.kext_SOURCES = \
69 $(VBoxNetAdp.kext_0_OUTDIR)/Info.plist
70 VBoxNetAdp.kext_CLEAN = \
71 $(VBoxNetAdp.kext_0_OUTDIR)/Info.plist
72
73$$(VBoxNetAdp.kext_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
74 $(call MSG_GENERATE,VBoxNetAdp,$@,$<)
75 $(QUIET)$(RM) -f $@
76 $(QUIET)$(SED) \
77 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
78 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
79 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
80 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
81 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
82 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
83 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
84 --output $@ \
85 $<
86
87 INSTALLS.darwin += Scripts-darwin-adp
88 Scripts-darwin-adp_INST = $(INST_DIST)
89 Scripts-darwin-adp_EXEC_SOURCES = \
90 darwin/loadnetadp.sh
91endif # darwin
92
93ifeq ($(KBUILD_TARGET),linux)
94 #
95 # Install source files for compilation on Linux.
96 # files_vboxnetadp defines VBOX_VBOXNETADP_SOURCES.
97 #
98 INSTALLS += VBoxNetAdp-src
99 include $(PATH_SUB_CURRENT)/linux/files_vboxnetadp
100 VBoxNetAdp-src_INST = bin/src/vboxnetadp/
101 VBoxNetAdp-src_SOURCES = \
102 $(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES)) \
103 $(VBoxNetAdp-src_0_OUTDIR)/Makefile
104 VBoxNetAdp-src_EXEC_SOURCES = \
105 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
106 VBoxNetAdp-src_CLEAN = \
107 $(VBoxNetAdp-src_0_OUTDIR)/Makefile \
108 $(PATH_TARGET)/VBoxNetAdp-src-1.dep \
109
110 # Scripts needed for building the kernel modules
111 includedep $(PATH_TARGET)/VBoxNetAdp-src-1.dep
112$$(VBoxNetAdp-src_0_OUTDIR)/Makefile: \
113 $(PATH_SUB_CURRENT)/linux/Makefile \
114 $$(if $$(eq $$(VBoxNetAdp/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
115 | $$(dir $$@)
116 $(QUIET)$(RM) -f -- $@
117 ifndef VBOX_WITH_HARDENING
118 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
119 else
120 $(QUIET)$(CP) -f $< $@
121 endif
122 %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/VBoxNetAdp-src-1.dep' 'VBoxNetAdp/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
123
124
125endif # linux
126
127ifeq ($(KBUILD_TARGET),freebsd)
128 #
129 # Install source files for compilation on FreeBSD.
130 # files_vboxnetadp defines VBOX_VBOXNETADP_SOURCES.
131 #
132 INSTALLS += VBoxNetAdp-src
133 include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetadp
134 VBoxNetAdp-src_INST = bin/src/vboxnetadp/
135 VBoxNetAdp-src_SOURCES = \
136 $(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES)) \
137 $(VBoxNetAdp-src_0_OUTDIR)/Makefile
138 VBoxNetAdp-src_CLEAN = \
139 $(VBoxNetAdp-src_0_OUTDIR)/Makefile \
140
141$$(VBoxNetAdp-src_0_OUTDIR)/Makefile: \
142 $(PATH_SUB_CURRENT)/freebsd/Makefile \
143 $$(if $$(eq $$(VBoxNetAdp/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
144 | $$(dir $$@)
145 $(QUIET)$(RM) -f -- $@
146 ifndef VBOX_WITH_HARDENING
147 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
148 else
149 $(QUIET)$(CP) -f $< $@
150 endif
151
152endif # freebsd
153
154include $(FILE_KBUILD_SUB_FOOTER)
155
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