VirtualBox

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

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

HostDrivers/VBoxPci: make it compilable without VBOX_WITH_VBOXDRV

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1# $Id: Makefile.kmk 38933 2011-10-04 07:48:45Z vboxsync $
2## @file
3# Sub-Makefile for the PCI passthru driver (VBoxPci).
4#
5
6#
7# Copyright (C) 2011 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
20if1of ($(KBUILD_TARGET), linux)
21
22 ifdef VBOX_WITH_VBOXDRV
23 #
24 # The driver.
25 # Note! For Linux, this is just a compile test. Don't use the binary!
26 #
27 SYSMODS += VBoxPci
28 VBoxPci_TEMPLATE = VBOXR0DRV
29 VBoxPci_INST = $(INST_VBOXPCI)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
30 VBoxPci_NAME.linux = vboxpci
31 VBoxPci_NOINST.linux = true
32 VBoxPci_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
33 VBoxPci_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxpci\) KBUILD_BASENAME=KBUILD_STR\(vboxpci\) MODULE
34 VBoxPci_INCS.linux := \
35 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
36 VBoxPci_INCS = \
37 .
38 VBoxPci_SOURCES.linux = \
39 linux/VBoxPci-linux.c
40 VBoxPci_SOURCES = \
41 VBoxPci.c
42 VBoxPci_LIBS += \
43 $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
44 endif
45
46 #
47 # Install the sources.
48 #
49 include $(PATH_SUB_CURRENT)/linux/files_vboxpci
50 INSTALLS += VBoxPci-src
51 VBoxPci-src_INST = bin/src/vboxpci/
52 VBoxPci-src_SOURCES = \
53 $(subst $(DQUOTE),,$(VBOX_VBOXPCI_SOURCES)) \
54 $(VBoxPci-src_0_OUTDIR)/Makefile
55 VBoxPci-src_EXEC_SOURCES = \
56 $(VBoxPci-src_0_OUTDIR)/build_in_tmp \
57 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers
58 VBoxPci-src_CLEAN = \
59 $(VBoxPci-src_0_OUTDIR)/Makefile \
60 $(PATH_TARGET)/VBoxPciSrc-src-1.dep \
61 $(VBoxPci-src_0_OUTDIR)/build_in_tmp
62
63 # Generate the scripts needed for building the kernel module.
64
65 includedep $(PATH_TARGET)/VBoxPci-src-1.dep
66$$(VBoxPci-src_0_OUTDIR)/Makefile: \
67 $(PATH_SUB_CURRENT)/linux/Makefile \
68 $$(if $$(eq $$(VBoxPci/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
69 | $$(dir $$@)
70 $(QUIET)$(RM) -f -- $@
71 ifndef VBOX_WITH_HARDENING
72 $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
73 else
74 $(QUIET)$(CP) -f $< $@
75 endif
76 %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/VBoxPci-src-1.dep' 'VBoxPci/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
77
78$$(VBoxPci-src_0_OUTDIR)/build_in_tmp: \
79 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
80 $(VBOX_VERSION_STAMP) \
81 | $$(dir $$@)
82 $(call MSG_TOOL,Creating,,$@)
83 $(QUIET)$(RM) -f -- $@
84 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxpci;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
85 $(QUIET)$(CHMOD) 0755 $@
86
87endif # Supported platform.
88include $(KBUILD_PATH)/subfooter.kmk
89
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette