1 | #
|
---|
2 | # Makefile for the VirtualBox Linux Host Network Filter Driver.
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-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
|
---|
19 | # there
|
---|
20 | obj ?= $(CURDIR)
|
---|
21 | include $(obj)/Makefile.include.header
|
---|
22 |
|
---|
23 | MOD_NAME = vboxnetflt
|
---|
24 | MOD_OBJS = \
|
---|
25 | linux/VBoxNetFlt-linux.o \
|
---|
26 | VBoxNetFlt.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 \
|
---|
43 | -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING \
|
---|
44 | -Wno-declaration-after-statement
|
---|
45 | ifeq ($(BUILD_TARGET_ARCH),amd64)
|
---|
46 | MOD_DEFS += -DRT_ARCH_AMD64
|
---|
47 | else
|
---|
48 | MOD_DEFS += -DRT_ARCH_X86
|
---|
49 | endif
|
---|
50 | # must be consistent with Config.kmk!
|
---|
51 | MOD_DEFS += -DVBOX_WITH_64_BITS_GUESTS
|
---|
52 |
|
---|
53 | # By default we use remap_pfn_range() kernel API to make kernel pages
|
---|
54 | # visible for userland. Unfortunately, it leads to situation that
|
---|
55 | # during debug session all structures on that page (such as PVM pointer)
|
---|
56 | # are not accessible to the debugger (see #3214).
|
---|
57 | # This code enables experimental support
|
---|
58 | # for vm_insert_page() kernel API, allowing to export kernel pages
|
---|
59 | # to the userland in more debugger-friendly way. Due to stability
|
---|
60 | # concerns, not enabled by default yet.
|
---|
61 | ifdef VBOX_USE_INSERT_PAGE
|
---|
62 | KFLAGS += -DVBOX_USE_INSERT_PAGE
|
---|
63 | endif
|
---|
64 |
|
---|
65 | # build defs
|
---|
66 | MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
|
---|
67 |
|
---|
68 | include $(obj)/Makefile.include.footer
|
---|