VirtualBox

Changeset 85939 in vbox for trunk/src/VBox/HostDrivers/linux


Ignore:
Timestamp:
Aug 28, 2020 6:36:30 PM (4 years ago)
Author:
vboxsync
Message:

Additions/linux/Makefile, HostDrivers/linux/Makefile: Many cleanups in the Linux kernel module Makefiles, making them more uniform, and allow install of individual modules. Additionally, allow building of the kernel modules straight from the respective subdirectory (no dependencies across directories, so vboxdrv/vboxguest still needs to be built first, otherwise you end up with undefined symbols). Finally some parallelization improvements. At the top level still uses the Module.symvers copying and somewhat quirky KBUILD_EXTRA_SYMBOLS pointing to the copy, because this is backwards compatible to before KBUILD_EXTRA_SYMBOLS was invented.

File:
1 edited

Legend:

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

    r85404 r85939  
    4646KBUILD_VERBOSE ?=
    4747KERN_VER ?= $(shell uname -r)
    48 .PHONY: all install clean check unload load vboxdrv vboxnetflt vboxnetadp \
    49     vboxpci
     48.PHONY: all install clean check unload load \
     49    vboxdrv vboxnetflt vboxnetadp vboxpci \
     50    install_vboxdrv install_vboxnetflt install_vboxnetadp install_vboxpci \
     51    clean_vboxdrv clean_vboxnetflt clean_vboxnetadp clean_vboxpci
    5052
    5153all: vboxdrv vboxnetflt vboxnetadp vboxpci
     
    9395        fi
    9496
    95 install:
     97install_vboxdrv:
    9698        +@$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxdrv install
     99
     100install_vboxnetflt:
    97101        +@if [ -d vboxnetflt ]; then \
    98102            $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetflt install; \
    99103        fi
     104
     105install_vboxnetadp:
    100106        +@if [ -d vboxnetadp ]; then \
    101107            $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxnetadp install; \
    102108        fi
     109
     110install_vboxpci:
    103111        +@if [ -d vboxpci ]; then \
    104112            $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxpci install; \
    105113        fi
     114
     115install: install_vboxdrv install_vboxnetflt install_vboxnetadp install_vboxpci
    106116
    107117else
     
    115125endif
    116126
    117 clean:
     127clean_vboxdrv:
    118128        +@$(MAKE) -C vboxdrv clean
     129        rm -rf vboxdrv.ko
     130
     131clean_vboxnetflt:
    119132        +@if [ -d vboxnetflt ]; then \
    120133            $(MAKE) -C vboxnetflt clean; \
    121134        fi
     135        rm -rf vboxnetflt.ko
     136
     137clean_vboxnetadp:
    122138        +@if [ -d vboxnetadp ]; then \
    123139            $(MAKE) -C vboxnetadp clean; \
    124140        fi
     141        rm -rf vboxnetadp.ko
     142
     143clean_vboxpci:
    125144        +@if [ -d vboxpci ]; then \
    126145            $(MAKE) -C vboxpci clean; \
    127146        fi
    128         rm -f vboxdrv.ko vboxnetflt.ko vboxnetadp.ko vboxpci.ko
     147        rm -f vboxpci.ko
     148
     149clean: clean_vboxdrv clean_vboxnetflt clean_vboxnetadp clean_vboxpci
    129150
    130151check:
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