VirtualBox

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

More linux kernel module Makefile cleansup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile

    r77390 r77393  
    1 # $Revision$
     1# $Id$
    22## @file
    33# VirtualBox Guest Additions Module Makefile.
     
    2525#
    2626
     27# Find the directory of this makefile.
     28VBOXGUEST_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
     29
    2730# Linux kbuild sets this to our source directory if we are called from there
    2831obj ?= $(CURDIR)
     
    3134MOD_NAME = vboxguest
    3235
    33 MOD_OBJS   = \
     36MOD_OBJS = \
    3437        VBoxGuest-linux.o \
    3538        VBoxGuest.o \
     
    124127endif
    125128ifeq ($(BUILD_TARGET_ARCH),amd64)
    126 MOD_OBJS +=     common/alloc/heapsimple.o
     129MOD_OBJS += common/alloc/heapsimple.o
    127130endif
    128131
    129132MOD_DEFS = -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST \
    130             -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
    131             -DVBOX_WITH_HGCM
     133           -DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST \
     134           -DVBOX_WITH_HGCM
    132135ifeq ($(BUILD_TARGET_ARCH),amd64)
    133  MOD_DEFS += -DRT_ARCH_AMD64
     136MOD_DEFS += -DRT_ARCH_AMD64
    134137else
    135  MOD_DEFS += -DRT_ARCH_X86
     138MOD_DEFS += -DRT_ARCH_X86
    136139endif
    137140ifeq ($(BUILD_TARGET_ARCH),amd64)
    138  MOD_DEFS += -DVBOX_WITH_64_BITS_GUESTS
    139 endif
    140 MOD_INCL  = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
    141 MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxguest,/ /include /r0drv/linux)
    142 
    143 ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxguest),)
    144  MANGLING := $(KBUILD_EXTMOD)/vboxguest/include/VBox/VBoxGuestMangling.h
    145 else
    146  MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
     141MOD_DEFS += -DVBOX_WITH_64_BITS_GUESTS
    147142endif
    148143ifeq ($(KERN_VERSION),24)
    149  ## @todo move to MOD_DEFS when we have finished refactoring
    150  MOD_CFLAGS = -DEXPORT_SYMTAB
     144MOD_DEFS += -DEXPORT_SYMTAB
     145endif
     146
     147MOD_INCL  = -I$(VBOXGUEST_DIR) -I$(VBOXGUEST_DIR)include -I$(VBOXGUEST_DIR)r0drv/linux
     148
     149ifeq ($(KERN_VERSION),24)
     150MOD_CFLAGS =
    151151else
    152  MOD_CFLAGS = -Wno-declaration-after-statement -include $(MANGLING) -fno-pie
     152MOD_CFLAGS = -Wno-declaration-after-statement -include $(VBOXGUEST_DIR)include/VBox/VBoxGuestMangling.h -fno-pie
    153153endif
    154154
    155155MOD_CLEAN = . linux r0drv generic r0drv/linux r0drv/generic VBox \
    156                 common/alloc common/err common/log common/math/gcc common/misc \
    157                 common/string common/table common/time
     156        common/alloc common/err common/log common/math/gcc common/misc \
     157        common/string common/table common/time
    158158
    159159include $(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