VirtualBox

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

Last change on this file since 40029 was 39333, checked in by vboxsync, 13 years ago

Installer/linux: more build_in_tmp simplificaion.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
Line 
1# $Id: Makefile.kmk 39333 2011-11-16 15:19:21Z vboxsync $
2## @file
3# Sub-Makefile for the Network Adapter Driver (VBoxNetAdp).
4#
5
6#
7# Copyright (C) 2009-2010 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_NAME.solaris = vboxnet
31 VBoxNetAdp_NAME.linux = vboxnetadp
32 VBoxNetAdp_NAME.freebsd = vboxnetadp
33 VBoxNetAdp_DEPS.solaris += $(VBOX_SVN_REV_KMK)
34 VBoxNetAdp_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
35 VBoxNetAdp_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxnetadp\) KBUILD_BASENAME=KBUILD_STR\(vboxnetadp\) MODULE
36 #VBoxNetAdp_LDFLAGS.darwin = -v -Wl,-whyload -Wl,-v -Wl,-whatsloaded
37 VBoxNetAdp_LDFLAGS.solaris += -N misc/gld -N drv/vboxdrv
38 VBoxNetAdp_INCS.linux := \
39 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
40 VBoxNetAdp_INCS = \
41 .
42 VBoxNetAdp_SOURCES.darwin = \
43 darwin/VBoxNetAdp-darwin.cpp \
44 VBoxNetAdp.c
45 VBoxNetAdp_SOURCES.solaris = \
46 solaris/VBoxNetAdp-solaris.c
47 VBoxNetAdp_SOURCES.linux = \
48 linux/VBoxNetAdp-linux.c \
49 VBoxNetAdp.c
50 VBoxNetAdp_SOURCES.freebsd = \
51 freebsd/VBoxNetAdp-freebsd.c \
52 VBoxNetAdp.c
53 VBoxNetAdp_SOURCES =
54 #VBoxNetAdp_SOURCES = \
55 # VBoxNetAdp.c
56 VBoxNetAdp_LIBS += \
57 $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
58 endif
59endif
60
61#
62# Darwin extras.
63#
64ifeq ($(KBUILD_TARGET),darwin)
65 INSTALLS += VBoxNetAdp.kext
66 VBoxNetAdp.kext_INST = $(INST_VBOXNETADP)Contents/
67 VBoxNetAdp.kext_SOURCES = \
68 $(VBoxNetAdp.kext_0_OUTDIR)/Info.plist
69 VBoxNetAdp.kext_CLEAN = \
70 $(VBoxNetAdp.kext_0_OUTDIR)/Info.plist
71
72$$(VBoxNetAdp.kext_0_OUTDIR)/Info.plist: $(PATH_SUB_CURRENT)/darwin/Info.plist $(VBOX_VERSION_MK) | $$(dir $$@)
73 $(call MSG_GENERATE,VBoxNetAdp,$@,$<)
74 $(QUIET)$(RM) -f $@
75 $(QUIET)$(SED) \
76 -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
77 -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
78 -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
79 -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
80 -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
81 -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
82 -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
83 --output $@ \
84 $<
85
86 INSTALLS.darwin += Scripts-darwin-adp
87 Scripts-darwin-adp_INST = $(INST_DIST)
88 Scripts-darwin-adp_EXEC_SOURCES = \
89 darwin/loadnetadp.sh
90endif # darwin
91
92ifeq ($(KBUILD_TARGET),linux)
93 #
94 # Install source files for compilation on Linux.
95 # files_vboxnetadp defines VBOX_VBOXNETADP_SOURCES.
96 #
97 INSTALLS += VBoxNetAdp-src
98 include $(PATH_SUB_CURRENT)/linux/files_vboxnetadp
99 VBoxNetAdp-src_INST = bin/src/vboxnetadp/
100 VBoxNetAdp-src_SOURCES = \
101 $(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES)) \
102 $(VBoxNetAdp-src_0_OUTDIR)/Makefile
103 VBoxNetAdp-src_EXEC_SOURCES = \
104 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
105 VBoxNetAdp-src_CLEAN = \
106 $(VBoxNetAdp-src_0_OUTDIR)/Makefile \
107 $(PATH_TARGET)/VBoxNetAdp-src-1.dep \
108
109 # Scripts needed for building the kernel modules
110 includedep $(PATH_TARGET)/VBoxNetAdp-src-1.dep
111$$(VBoxNetAdp-src_0_OUTDIR)/Makefile: \
112 $(PATH_SUB_CURRENT)/linux/Makefile \
113 $$(if $$(eq $$(VBoxNetAdp/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
114 | $$(dir $$@)
115 $(QUIET)$(RM) -f -- $@
116 ifndef VBOX_WITH_HARDENING
117 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
118 else
119 $(QUIET)$(CP) -f $< $@
120 endif
121 %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/VBoxNetAdp-src-1.dep' 'VBoxNetAdp/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
122
123
124endif # linux
125
126ifeq ($(KBUILD_TARGET),freebsd)
127 #
128 # Install source files for compilation on FreeBSD.
129 # files_vboxnetadp defines VBOX_VBOXNETADP_SOURCES.
130 #
131 INSTALLS += VBoxNetAdp-src
132 include $(PATH_SUB_CURRENT)/freebsd/files_vboxnetadp
133 VBoxNetAdp-src_INST = bin/src/vboxnetadp/
134 VBoxNetAdp-src_SOURCES = \
135 $(subst $(DQUOTE),,$(VBOX_VBOXNETADP_SOURCES)) \
136 $(VBoxNetAdp-src_0_OUTDIR)/Makefile
137 VBoxNetAdp-src_CLEAN = \
138 $(VBoxNetAdp-src_0_OUTDIR)/Makefile \
139
140$$(VBoxNetAdp-src_0_OUTDIR)/Makefile: \
141 $(PATH_SUB_CURRENT)/freebsd/Makefile \
142 $$(if $$(eq $$(VBoxNetAdp/freebsd/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
143 | $$(dir $$@)
144 $(QUIET)$(RM) -f -- $@
145 ifndef VBOX_WITH_HARDENING
146 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
147 else
148 $(QUIET)$(CP) -f $< $@
149 endif
150
151endif # freebsd
152
153include $(KBUILD_PATH)/subfooter.kmk
154
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