VirtualBox

Ignore:
Timestamp:
Feb 20, 2019 4:09:58 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128944
Message:

More linux kernel module Makefile cleansup.

File:
1 edited

Legend:

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

    r77390 r77393  
    4848        qdivrem.o
    4949endif
    50 
    51 MOD_INCL = -I$(VBOXSF_DIR) -I$(VBOXSF_DIR)include -I$(VBOXSF_DIR)r0drv/linux -I`pwd` -I`pwd`
    52 
    53 MOD_DEFS   = -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DIN_MODULE -DIN_GUEST -DIN_GUEST_R0
    54 # our module does not export any symbol
    55 MOD_DEFS  += -DRT_NO_EXPORT_SYMBOL
     50MOD_INCL = \
     51        -I$(VBOXSF_DIR) \
     52        -I$(VBOXSF_DIR)include \
     53        -I$(VBOXSF_DIR)r0drv/linux
     54MOD_DEFS = \
     55        -DRT_OS_LINUX \
     56        -DIN_RING0 \
     57        -DIN_RT_R0 \
     58        -DIN_SUP_R0 \
     59        -DVBOX \
     60        -DVBOX_WITH_HGCM \
     61        -DIN_MODULE \
     62        -DIN_GUEST \
     63        -DIN_GUEST_R0 \
     64        -DRT_NO_EXPORT_SYMBOL
    5665ifeq ($(BUILD_TARGET_ARCH),amd64)
    57  MOD_DEFS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
     66MOD_DEFS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
    5867else
    59  MOD_DEFS += -DRT_ARCH_X86
     68MOD_DEFS += -DRT_ARCH_X86
     69endif
     70ifeq ($(KERN_VERSION),24)
     71MOD_CFLAGS =
     72else
     73MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(VBOXSF_DIR)/include/VBox/VBoxGuestMangling.h -fno-pie
     74endif
     75ifdef VBOX_NO_OMIT_FRAME_POINTER
     76MOD_CFLAGS += -fno-omit-frame-pointer
    6077endif
    6178
    62 ifeq ($(KERN_VERSION), 24)
    63  MOD_CFLAGS =
    64 else
    65  MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(VBOXSF_DIR)/include/VBox/VBoxGuestMangling.h -fno-pie
    66 
     79ifneq ($(KERN_VERSION),24)
    6780# special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5),
    6881# ClarkConnect 4.3 (cc4) and ClarkConnect 5 (v5)
    6982 ifeq ($(KERNELRELEASE),)
    70   MOD_EXTRA += $(foreach inc,$(KERN_INCL),\
    71               $(if $(wildcard $(inc)/linux/utsrelease.h),\
    72                 $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
    73                             grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
    74                             grep '"2.6.18.*v5.*"'  $(inc)/linux/utsrelease.h; \
    75                             grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
    76                 -DKERNEL_FC6,),))
     83MOD_EXTRA += $(foreach inc,$(KERN_INCL),\
     84               $(if $(wildcard $(inc)/linux/utsrelease.h),\
     85                 $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
     86                              grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
     87                              grep '"2.6.18.*v5.*"'  $(inc)/linux/utsrelease.h; \
     88                              grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
     89                   -DKERNEL_FC6,),))
    7790 else
    78   MOD_EXTRA += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
    79                         echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
    80                         echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*';\
    81                         echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
     91MOD_EXTRA += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
     92                          echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
     93                          echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*';\
     94                          echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
    8295                -DKERNEL_FC6,)
    8396 endif
    84 endif
    85 ifdef VBOX_NO_OMIT_FRAME_POINTER
    86  MOD_CFLAGS += -fno-omit-frame-pointer
    8797endif
    8898
Note: See TracChangeset for help on using the changeset viewer.

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