VirtualBox

Ignore:
Timestamp:
Feb 20, 2019 4:27:55 PM (6 years ago)
Author:
vboxsync
Message:

More linux kernel module Makefile cleansup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxPci/linux/Makefile

    r77390 r77394  
    1 #
     1# $Id$
     2## @file
    23# Makefile for the VirtualBox Linux Host PCI Driver.
    34#
     
    2425#
    2526
     27# Find the directory of this makefile.
     28VBOXPCI_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
     29
    2630# Linux kbuild sets this to our source directory if we are called from there
    2731obj ?= $(CURDIR)
     
    3034# override is required by the Debian guys
    3135MOD_NAME = vboxpci
    32 MOD_OBJS =                              \
    33         linux/VBoxPci-linux.o           \
    34         VBoxPci.o                       \
    35         SUPR0IdcClient.o                \
    36         SUPR0IdcClientComponent.o       \
    37         linux/SUPR0IdcClient-linux.o
    38 
     36MOD_OBJS = \
     37        linux/VBoxPci-linux.o \
     38        VBoxPci.o \
     39        SUPR0IdcClient.o \
     40        SUPR0IdcClientComponent.o \
     41        linux/SUPR0IdcClient-linux.o
    3942ifeq ($(BUILD_TARGET_ARCH),x86)
    40 MOD_OBJS += math/gcc/divdi3.o       \
    41         math/gcc/moddi3.o       \
    42         math/gcc/qdivrem.o      \
    43         math/gcc/udivdi3.o      \
    44         math/gcc/udivmoddi4.o   \
    45         math/gcc/divdi3.o       \
     43MOD_OBJS += \
     44        math/gcc/divdi3.o \
     45        math/gcc/moddi3.o \
     46        math/gcc/qdivrem.o \
     47        math/gcc/udivdi3.o \
     48        math/gcc/udivmoddi4.o \
     49        math/gcc/divdi3.o \
    4650        math/gcc/umoddi3.o
    4751endif
    48 
    49 MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
    50 MOD_DEFS = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX \
    51         -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
     52MOD_INCL = \
     53        -I$(VBOXPCI_DIR) \
     54        -I$(VBOXPCI_DIR)include \
     55        -I$(VBOXPCI_DIR)r0drv/linux
     56MOD_DEFS = \
     57        -DRT_OS_LINUX \
     58        -DIN_RING0 \
     59        -DIN_RT_R0 \
     60        -DIN_SUP_R0 \
     61        -DVBOX \
     62        -DRT_WITH_VBOX \
     63        -DVBOX_WITH_HARDENING
    5264ifeq ($(BUILD_TARGET_ARCH),amd64)
    53  MOD_DEFS += -DRT_ARCH_AMD64
     65MOD_DEFS += -DRT_ARCH_AMD64
    5466else
    55  MOD_DEFS += -DRT_ARCH_X86
     67MOD_DEFS += -DRT_ARCH_X86
    5668endif
    57 
    58 # By default we use remap_pfn_range() kernel API to make kernel pages
    59 # visible for userland. Unfortunately, it leads to situation that
    60 # during debug session all structures on that page (such as PVM pointer)
    61 # are not accessible to the debugger (see #3214).
    62 # This code enables experimental support
    63 # for vm_insert_page() kernel API, allowing to export kernel pages
    64 # to the userland in more debugger-friendly way. Due to stability
    65 # concerns, not enabled by default yet.
    66 ifdef VBOX_USE_INSERT_PAGE
    67  MOD_DEFS += -DVBOX_USE_INSERT_PAGE
    68 endif
    69 
    70 # build defs
    71 MOD_CFLAGS = -include $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h -fno-pie
     69MOD_CFLAGS = -include $(VBOXPCI_DIR)include/VBox/SUPDrvMangling.h -fno-pie
    7270
    7371include $(obj)/Makefile-footer.gmk
Note: See TracChangeset for help on using the changeset viewer.

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