1 | #
|
---|
2 | # Makefile for the VirtualBox Linux Host PCI Driver.
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | #
|
---|
7 | # Copyright (C) 2011-2017 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 |
|
---|
18 | # Linux kbuild sets this to our source directory if we are called from there
|
---|
19 | obj ?= $(CURDIR)
|
---|
20 | include $(obj)/Makefile.include.header
|
---|
21 |
|
---|
22 | # override is required by the Debian guys
|
---|
23 | MOD_NAME = vboxpci
|
---|
24 | MOD_OBJS = \
|
---|
25 | linux/VBoxPci-linux.o \
|
---|
26 | VBoxPci.o \
|
---|
27 | SUPR0IdcClient.o \
|
---|
28 | SUPR0IdcClientComponent.o \
|
---|
29 | linux/SUPR0IdcClient-linux.o
|
---|
30 |
|
---|
31 | ifeq ($(BUILD_TARGET_ARCH),x86)
|
---|
32 | MOD_OBJS += math/gcc/divdi3.o \
|
---|
33 | math/gcc/moddi3.o \
|
---|
34 | math/gcc/qdivrem.o \
|
---|
35 | math/gcc/udivdi3.o \
|
---|
36 | math/gcc/udivmoddi4.o \
|
---|
37 | math/gcc/divdi3.o \
|
---|
38 | math/gcc/umoddi3.o
|
---|
39 | endif
|
---|
40 |
|
---|
41 | MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
|
---|
42 | MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX \
|
---|
43 | -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
|
---|
44 | ifeq ($(BUILD_TARGET_ARCH),amd64)
|
---|
45 | MOD_DEFS += -DRT_ARCH_AMD64
|
---|
46 | else
|
---|
47 | MOD_DEFS += -DRT_ARCH_X86
|
---|
48 | endif
|
---|
49 |
|
---|
50 | # By default we use remap_pfn_range() kernel API to make kernel pages
|
---|
51 | # visible for userland. Unfortunately, it leads to situation that
|
---|
52 | # during debug session all structures on that page (such as PVM pointer)
|
---|
53 | # are not accessible to the debugger (see #3214).
|
---|
54 | # This code enables experimental support
|
---|
55 | # for vm_insert_page() kernel API, allowing to export kernel pages
|
---|
56 | # to the userland in more debugger-friendly way. Due to stability
|
---|
57 | # concerns, not enabled by default yet.
|
---|
58 | ifdef VBOX_USE_INSERT_PAGE
|
---|
59 | MOD_DEFS += -DVBOX_USE_INSERT_PAGE
|
---|
60 | endif
|
---|
61 |
|
---|
62 | # build defs
|
---|
63 | MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
|
---|
64 |
|
---|
65 | include $(obj)/Makefile.include.footer
|
---|