[38183] | 1 | # $Id: Makefile.kmk 66073 2017-03-13 20:26:31Z vboxsync $
|
---|
| 2 | ## @file
|
---|
| 3 | # Sub-Makefile for the PCI passthru driver (VBoxPci).
|
---|
| 4 | #
|
---|
| 5 |
|
---|
| 6 | #
|
---|
[62490] | 7 | # Copyright (C) 2011-2016 Oracle Corporation
|
---|
[38183] | 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 |
|
---|
[35920] | 18 | SUB_DEPTH = ../../../..
|
---|
| 19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
[66073] | 20 | if1of ($(KBUILD_TARGET), linux)
|
---|
[35920] | 21 |
|
---|
[38933] | 22 | ifdef VBOX_WITH_VBOXDRV
|
---|
| 23 | #
|
---|
| 24 | # The driver.
|
---|
| 25 | #
|
---|
| 26 | SYSMODS += VBoxPci
|
---|
| 27 | VBoxPci_TEMPLATE = VBOXR0DRV
|
---|
| 28 | VBoxPci_INST = $(INST_VBOXPCI)$(if $(eq $(KBUILD_TARGET),darwin),Contents/MacOS/)
|
---|
| 29 | VBoxPci_NAME.linux = vboxpci
|
---|
| 30 | VBoxPci_DEFS = IN_RT_R0 VBOX_SVN_REV=$(VBOX_SVN_REV) IN_SUP_STATIC
|
---|
| 31 | VBoxPci_INCS = \
|
---|
[38183] | 32 | .
|
---|
[38933] | 33 | VBoxPci_SOURCES = \
|
---|
[38183] | 34 | VBoxPci.c
|
---|
[38933] | 35 | VBoxPci_LIBS += \
|
---|
[38183] | 36 | $(PATH_STAGE_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB)
|
---|
[38933] | 37 | endif
|
---|
[35920] | 38 |
|
---|
[38183] | 39 | #
|
---|
| 40 | # Install the sources.
|
---|
| 41 | #
|
---|
[35920] | 42 | include $(PATH_SUB_CURRENT)/linux/files_vboxpci
|
---|
[38183] | 43 | INSTALLS += VBoxPci-src
|
---|
| 44 | VBoxPci-src_INST = bin/src/vboxpci/
|
---|
| 45 | VBoxPci-src_SOURCES = \
|
---|
| 46 | $(subst $(DQUOTE),,$(VBOX_VBOXPCI_SOURCES)) \
|
---|
| 47 | $(VBoxPci-src_0_OUTDIR)/Makefile
|
---|
| 48 | VBoxPci-src_CLEAN = \
|
---|
| 49 | $(VBoxPci-src_0_OUTDIR)/Makefile \
|
---|
| 50 | $(PATH_TARGET)/VBoxPciSrc-src-1.dep \
|
---|
[35920] | 51 |
|
---|
[38183] | 52 | # Generate the scripts needed for building the kernel module.
|
---|
[35920] | 53 |
|
---|
[38183] | 54 | includedep $(PATH_TARGET)/VBoxPci-src-1.dep
|
---|
[35920] | 55 | $$(VBoxPci-src_0_OUTDIR)/Makefile: \
|
---|
| 56 | $(PATH_SUB_CURRENT)/linux/Makefile \
|
---|
| 57 | $$(if $$(eq $$(VBoxPci/linux/Makefile_VBOX_HARDENED),$$(VBOX_WITH_HARDENING)),,FORCE) \
|
---|
| 58 | | $$(dir $$@)
|
---|
[38183] | 59 | $(QUIET)$(RM) -f -- $@
|
---|
| 60 | ifndef VBOX_WITH_HARDENING
|
---|
[35920] | 61 | $(QUIET)$(SED) -e "s;-DVBOX_WITH_HARDENING;;g" --output $@ $<
|
---|
[38183] | 62 | else
|
---|
[35920] | 63 | $(QUIET)$(CP) -f $< $@
|
---|
[38183] | 64 | endif
|
---|
| 65 | %$(QUIET2)$(APPEND) -t '$(PATH_TARGET)/VBoxPci-src-1.dep' 'VBoxPci/linux/Makefile_VBOX_HARDENED=$(VBOX_WITH_HARDENING)'
|
---|
[35920] | 66 |
|
---|
[38183] | 67 | endif # Supported platform.
|
---|
[41477] | 68 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
[35920] | 69 |
|
---|