VirtualBox

Changeset 68644 in vbox


Ignore:
Timestamp:
Sep 5, 2017 2:08:31 PM (7 years ago)
Author:
vboxsync
Message:

Additions/linux/drm: clean up Makefile.
bugref:4567: Linux kernel driver maintenance

Make the make file work properly with unsupported kernels, i.e. not build.
Also do some clean-up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/drm/Makefile.module.kms

    r68306 r68644  
    1818#
    1919
    20 MY_KERNELRELEASE := $(KERNELRELEASE)
    21 ifeq ($(MY_KERNELRELEASE),)
    22   # as of 2.6.16 KERNELRELEASE is only set if the kernel is configured
    23   MY_KERNELRELEASE := $(KERNELVERSION)
    24 endif
    25 ifeq ($(filter 1.% 2.% 3.0.% 3.1.% 3.2.% 3.3.% 3.4.% 3.5.% 3.6.% 3.7.% \
    26 3.8.% 3.9.%,$(MY_KERNELRELEASE)),)
    27 
    2820# Linux kbuild sets this to our source directory if we are called from there
    2921obj ?= $(CURDIR)
    3022include $(obj)/Makefile.include.header
    3123
    32 # sledgehammer, see the 2.4 handling in Makefile.include.footer
    33 ifneq ($(KERN_VERSION),24)
     24# We want to build on Linux 3.11 and later, plus the 3.10 EL 7.3 and later
     25# kernels.  This file was added in 3.11 and back-ported to the EL 7.3 kernel.
     26ifneq ($(wildcard $(KERN_INCL)/drm/drm_rect.h),)
    3427
    3528MOD_NAME   = vboxvideo
    36 
    3729MOD_OBJS   = hgsmi_base.o \
    3830             modesetting.o vbox_drv.o vbox_fb.o vbox_irq.o vbox_main.o \
    3931             vbox_mode.o vbox_ttm.o vbva_base.o vbox_prime.o vbox_hgsmi.o
    40 
    41 MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -fno-pie
    42 MOD_INCL   = $(addprefix -I$(KBUILD_EXTMOD),/ /include)
    43 # What on earth is this?
    44 # MOD_INCL  += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include)
    45 MOD_INCL  += -Iinclude/drm
    46 MOD_DEFS  := -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
    47              -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE \
    48              -DIN_GUEST_R0
    49 # our module does not export any symbol
    50 MOD_DEFS  += -DRT_NO_EXPORT_SYMBOL
    51 ifeq ($(BUILD_TARGET_ARCH),amd64)
    52  MOD_DEFS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
    53 else
    54  MOD_DEFS += -DRT_ARCH_X86
    55 endif
    56 MOD_CLEAN  = . linux r0drv r0drv/linux
     32MOD_INCL   = -I$(KBUILD_EXTMOD) -Iinclude/drm
    5733
    5834include $(obj)/Makefile.include.footer
    5935
    60 else # KERN_VERSION=24
     36else  # ! wildcard $(KERN_INCL)/drm/drm_rect.h
    6137
    62 all:
     38 all:
     39 install:
     40 clean:
    6341
    64 endif # KERN_VERSION=24
    65 
    66 else # ifneq ($(filter ...,$(MY_KERNELRELEASE)),)
    67 
    68 all:
    69 
    70 endif # ifneq ($(filter ...,$(MY_KERNELRELEASE)),)
    71 
     42endif  # ! wildcard $(KERN_INCL)/drm/drm_rect.h
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