VirtualBox

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

Last change on this file since 36231 was 35920, checked in by vboxsync, 14 years ago

PCI: Linux driver

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1# $Id: Makefile.kmk 35920 2011-02-09 17:14:11Z vboxsync $
2## @file
3# Top-level makefile for the VBox Host drivers.
4#
5
6#
7# Copyright (C) 2006-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
21# Include sub-makefiles.
22include $(PATH_SUB_CURRENT)/Support/Makefile.kmk
23
24if !defined(VBOX_ONLY_DOCS) \
25 && !defined(VBOX_ONLY_EXTPACKS) \
26 && !defined(VBOX_ONLY_TESTSUITE)
27 ifdef VBOX_WITH_USB
28 include $(PATH_SUB_CURRENT)/VBoxUSB/Makefile.kmk
29 endif
30 if1of ($(KBUILD_TARGET), darwin solaris win linux freebsd)
31 ifdef VBOX_WITH_NETFLT
32 include $(PATH_SUB_CURRENT)/VBoxNetFlt/Makefile.kmk
33 endif
34 endif
35 if1of ($(KBUILD_TARGET), darwin solaris linux freebsd)
36 ifdef VBOX_WITH_NETADP
37 include $(PATH_SUB_CURRENT)/VBoxNetAdp/Makefile.kmk
38 endif
39 endif
40 ifeq ($(KBUILD_TARGET),darwin)
41 include $(PATH_SUB_CURRENT)/darwin/Makefile.kmk
42 endif
43
44 if1of ($(KBUILD_TARGET), linux)
45 ifdef VBOX_WITH_PCI_PASSTHROUGH
46 include $(PATH_SUB_CURRENT)/VBoxPci/Makefile.kmk
47 endif
48 endif
49
50 if1of ($(KBUILD_TARGET),linux freebsd)
51 #
52 # Install the Makefile for module compilation on Linux and FreeBSD hosts
53 #
54 INSTALLS += HostDrivers-src
55 HostDrivers-src_INST = bin/src/
56 HostDrivers-src_MODE = a+r,u+w
57 HostDrivers-src_SOURCES.linux = linux/Makefile
58 HostDrivers-src_SOURCES.freebsd = freebsd/Makefile
59 endif
60
61 if1of ($(KBUILD_TARGET),linux)
62 INSTALLS += HostDrivers-dkms-sh
63 HostDrivers-dkms-sh_INST = bin/src/
64 HostDrivers-dkms-sh_MODE = a+rx,u+w
65 HostDrivers-dkms-sh_SOURCES = $(HostDrivers-dkms-sh_0_OUTDIR)/do_dkms
66 HostDrivers-dkms-sh_CLEAN = $(HostDrivers-dkms-sh_0_OUTDIR)/do_dkms
67
68 INSTALLS += HostDrivers-dkms-src
69 HostDrivers-dkms-src_INST = bin/src/
70 HostDrivers-dkms-src_MODE = a+r,u+w
71 HostDrivers-dkms-src_SOURCES = $(HostDrivers-dkms-src_0_OUTDIR)/dkms.conf
72 HostDrivers-dkms-src_CLEAN = $(HostDrivers-dkms-src_0_OUTDIR)/dkms.conf
73
74$$(HostDrivers-dkms-src_0_OUTDIR)/dkms.conf: \
75 $(PATH_SUB_CURRENT)/linux/dkms.conf \
76 $(VBOX_VERSION_STAMP) \
77 | $$(dir $$@)
78 $(call MSG_TOOL,Creating,,$@)
79 $(QUIET)$(SED) \
80 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \
81 -e "s;_OMIT_VBOXNETFLT_;$(if $(VBOX_WITH_NETFLT),,#);g" \
82 -e "s;_OMIT_VBOXNETADP_;$(if $(VBOX_WITH_NETADP),,#);g" \
83 --output $@ $<
84
85$$(HostDrivers-dkms-sh_0_OUTDIR)/do_dkms: \
86 $(PATH_SUB_CURRENT)/linux/do_dkms \
87 $(VBOX_VERSION_STAMP) \
88 | $$(dir $$@)
89 $(call MSG_TOOL,Creating,,$@)
90 $(QUIET)$(SED) \
91 -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \
92 -e "s;_MODULE_;vboxhost;g" \
93 -e "s;_OLDMODULES_;vboxhost vboxdrv vboxnetflt vboxnetadp;g" \
94 --output $@ $<
95
96 endif
97
98 if1of ($(KBUILD_TARGET),freebsd)
99 #
100 # Install the export_modules script for tar'ing the module sources on FreeBSD hosts
101 #
102 INSTALLS += HostDrivers-sh
103 HostDrivers-sh_INST = bin/
104 HostDrivers-sh_MODE = a+rx,u+w
105 HostDrivers-sh_SOURCES.freebsd = freebsd/export_modules
106 endif
107endif # !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_TESTSUITE)
108
109# Let kBuild generate the rules.
110include $(KBUILD_PATH)/subfooter.kmk
111
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