VirtualBox

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

Last change on this file since 29250 was 28800, checked in by vboxsync, 15 years ago

Automated rebranding to Oracle copyright/license strings via filemuncher

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.8 KB
Line 
1# $Id: Makefile.kmk 28800 2010-04-27 08:22:32Z vboxsync $
2## @file
3# Sub-Makefile for the Network Adapter Driver (VBoxNetAdp).
4#
5
6#
7# Copyright (C) 2009 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
21
22if1of ($(KBUILD_TARGET), solaris darwin linux freebsd)
23#
24# VBoxNetAdp - Virtual Network Adapter
25# Note! On Solaris the name has to be <= 8 chars long.
26#
27 ifdef VBOX_WITH_VBOXDRV
28SYSMODS += VBoxNetAdp
29VBoxNetAdp_TEMPLATE = VBOXR0DRV
30VBoxNetAdp_INST = $(INST_VBOXNETADP)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
31VBoxNetAdp_NAME.solaris = vboxnet
32VBoxNetAdp_NAME.linux = vboxnetadp
33VBoxNetAdp_NAME.freebsd = vboxnetadp
34VBoxNetAdp_NOINST.linux = true
35VBoxNetAdp_DEPS.solaris += $(VBOX_SVN_REV_KMK)
36VBoxNetAdp_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
37VBoxNetAdp_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetadp\) KBUILD_BASENAME=KBUILD_STR\(vboxnetadp\) MODULE
38#VBoxNetAdp_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
39VBoxNetAdp_LDFLAGS.solaris += -N misc/gld -N drv/vboxdrv
40VBoxNetAdp_INCS.linux := \
41 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
42VBoxNetAdp_INCS = \
43 .
44VBoxNetAdp_SOURCES.darwin = \
45 darwin/VBoxNetAdp-darwin.cpp \
46 VBoxNetAdp.c
47VBoxNetAdp_SOURCES.solaris = \
48 solaris/VBoxNetAdp-solaris.c
49VBoxNetAdp_SOURCES.linux = \
50 linux/VBoxNetAdp-linux.c \
51 VBoxNetAdp.c
52VBoxNetAdp_SOURCES.freebsd = \
53 freebsd/VBoxNetAdp-freebsd.c \
54 VBoxNetAdp.c
55VBoxNetAdp_SOURCES =
56#VBoxNetAdp_SOURCES = \
57# VBoxNetAdp.c
58VBoxNetAdp_LIBS += \
59 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
60 endif
61endif
62
63#
64# Darwin extras.
65#
66ifeq ($(KBUILD_TARGET),darwin)
67INSTALLS += VBoxNetAdp.kext
68VBoxNetAdp.kext_INST = $(INST_VBOXNETADP)Contents/
69VBoxNetAdp.kext_SOURCES = \
70 $(PATH_VBoxNetAdp.kext)/Info.plist
71VBoxNetAdp.kext_CLEAN = \
72 $(PATH_VBoxNetAdp.kext)/Info.plist
73
74$$(PATH_VBoxNetAdp.kext)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
75 $(call MSG_GENERATE,VBoxNetAdp,$@,$<)
76 $(QUIET)$(RM) -f $@
77 $(QUIET)$(SED) \
78 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
79 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
80 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
81 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
82 --output $@ \
83 $<
84
85INSTALLS.darwin += Scripts-darwin-adp
86Scripts-darwin-adp_INST = $(INST_DIST)
87Scripts-darwin-adp_SOURCES = \
88 darwin/loadnetadp.sh
89endif # darwin
90
91ifeq ($(KBUILD_TARGET),linux)
92 #
93 # Install source files for compliation on Linux.
94 # files_vboxnetadp defines VBOX_VBOXNETADP_SOURCES.
95 #
96 include $(PATH_SUB_CURRENT)/linux/files_vboxnetadp
97 INSTALLS += VBoxNetAdp-src VBoxNetAdp-sh
98 VBoxNetAdp-src_INST = bin/src/vboxnetadp/
99 VBoxNetAdp-src_MODE = a+r,u+w
100 VBoxNetAdp-src_SOURCES = $(subst ",,$(VBOX_VBOXNETADP_SOURCES)) #"
101 VBoxNetAdp-src_SOURCES+= \
102 $(if $(VBOX_OSE),,\
103 $(PATH_VBoxNetAdp-src)/dkms.conf) \
104 $(PATH_VBoxNetAdp-src)/Makefile
105 VBoxNetAdp-src_CLEAN = \
106 $(PATH_VBoxNetAdp-src)/dkms.conf \
107 $(PATH_VBoxNetAdp-src)/Makefile \
108 $(PATH_TARGET)/VBoxNetAdp-src-1.dep
109
110 VBoxNetAdp-sh_INST = bin/src/vboxnetadp/
111 VBoxNetAdp-sh_MODE = a+rx,u+w
112 VBoxNetAdp-sh_SOURCES = \
113 $(PATH_VBoxNetAdp-sh)/build_in_tmp \
114 $(if $(VBOX_OSE),,\
115 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
116 VBoxNetAdp-sh_CLEAN = $(PATH_VBoxNetAdp-sh)/build_in_tmp
117
118
119includedep $(PATH_TARGET)/VBoxNetAdp-src-1.dep
120$$(PATH_VBoxNetAdp-src)/Makefile: \
121 $(PATH_SUB_CURRENT)/linux/Makefile \
122 $$(if $$(eq $$(VBoxNetAdp/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
123 | $$(dir $$@)
124ifndef VBOX_WITH_HARDENING
125 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
126else
127 $(QUIET)$(CP) -f $< $@
128endif
129 %$(QUIET2)$(RM) -f -- $(PATH_TARGET)/VBoxNetAdp-src-1.dep
130 %$(QUIET2)$(APPEND) '$(PATH_TARGET)/VBoxNetAdp-src-1.dep' 'VBoxNetAdp/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
131
132## Scripts needed for building the kernel modules
133
134$$(PATH_VBoxNetAdp-sh)/build_in_tmp: \
135 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
136 $(VBOX_VERSION_STAMP) \
137 | $$(dir $$@)
138 $(call MSG_TOOL,Creating,,$@)
139 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxnetadp;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
140 $(QUIET)chmod 0755 $@
141
142$$(PATH_VBoxNetAdp-src)/dkms.conf: \
143 $(PATH_SUB_CURRENT)/linux/dkms.conf \
144 $(VBOX_VERSION_STAMP) \
145 | $$(dir $$@)
146 $(call MSG_TOOL,Creating,,$@)
147 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
148
149endif # linux
150
151ifeq ($(KBUILD_TARGET),freebsd)
152 #
153 # Install source files for compliation on FreeBSD.
154 # files_vboxnetadp defines VBOX_VBOXNETADP_SOURCES.
155 #
156 include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetadp
157 INSTALLS += VBoxNetAdp-src
158 VBoxNetAdp-src_INST = bin/src/vboxnetadp/
159 VBoxNetAdp-src_MODE = a+r,u+w
160 VBoxNetAdp-src_SOURCES = $(subst ",,$(VBOX_VBOXNETADP_SOURCES)) #"
161 VBoxNetAdp-src_SOURCES+= \
162 $(PATH_VBoxNetAdp-src)/Makefile
163 VBoxNetAdp-src_CLEAN = \
164 $(PATH_VBoxNetAdp-src)/Makefile \
165
166$$(PATH_VBoxNetAdp-src)/Makefile: \
167 $(PATH_SUB_CURRENT)/freebsd/Makefile \
168 $$(if $$(eq $$(VBoxNetAdp/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
169 | $$(dir $$@)
170ifndef VBOX_WITH_HARDENING
171 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
172else
173 $(QUIET)$(CP) -f $< $@
174endif
175
176endif # freebsd
177
178include $(KBUILD_PATH)/subfooter.kmk
179
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