[25590] | 1 | #
|
---|
| 2 | # Makefile for the VirtualBox FreeBSD Guest Drivers.
|
---|
| 3 | #
|
---|
| 4 |
|
---|
| 5 | #
|
---|
[98103] | 6 | # Copyright (C) 2009-2023 Oracle and/or its affiliates.
|
---|
[25590] | 7 | #
|
---|
[96407] | 8 | # This file is part of VirtualBox base platform packages, as
|
---|
| 9 | # available from https://www.virtualbox.org.
|
---|
[25590] | 10 | #
|
---|
[96407] | 11 | # This program is free software; you can redistribute it and/or
|
---|
| 12 | # modify it under the terms of the GNU General Public License
|
---|
| 13 | # as published by the Free Software Foundation, in version 3 of the
|
---|
| 14 | # License.
|
---|
| 15 | #
|
---|
| 16 | # This program is distributed in the hope that it will be useful, but
|
---|
| 17 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
| 19 | # General Public License for more details.
|
---|
| 20 | #
|
---|
| 21 | # You should have received a copy of the GNU General Public License
|
---|
| 22 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
| 23 | #
|
---|
| 24 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
| 25 | #
|
---|
[25590] | 26 |
|
---|
| 27 | KBUILD_VERBOSE =
|
---|
| 28 |
|
---|
| 29 | all:
|
---|
[66222] | 30 | @echo "=== Building 'vboxguest' module ==="
|
---|
[25590] | 31 | @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest
|
---|
| 32 | @if [ -f vboxguest/vboxguest.ko ]; then \
|
---|
| 33 | cp vboxguest/vboxguest.ko .; \
|
---|
| 34 | fi
|
---|
| 35 | @echo
|
---|
| 36 | @if [ -d vboxvfs ]; then \
|
---|
[66222] | 37 | echo "=== Building 'vboxvfs' module ==="; \
|
---|
[25590] | 38 | $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \
|
---|
| 39 | if [ -f vboxvfs/vboxvfs.ko ]; then \
|
---|
| 40 | cp vboxvfs/vboxvfs.ko .; \
|
---|
| 41 | fi; \
|
---|
| 42 | fi
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | install:
|
---|
| 46 | @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
|
---|
| 47 | @if [ -d vboxvfs ]; then \
|
---|
| 48 | $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs install; \
|
---|
| 49 | fi
|
---|
| 50 |
|
---|
| 51 | clean:
|
---|
| 52 | @$(MAKE) -C vboxguest clean
|
---|
| 53 | @if [ -d vboxvfs ]; then \
|
---|
| 54 | $(MAKE) -C vboxvfs clean; \
|
---|
| 55 | fi
|
---|
| 56 | rm -f vboxguest.*o vboxvfs.*o
|
---|
| 57 |
|
---|
| 58 | load:
|
---|
| 59 | @/sbin/kldunload vboxvfs || true
|
---|
| 60 | @/sbin/kldunload vboxguest || true
|
---|
| 61 | @/sbin/kldload ./vboxguest.ko
|
---|
| 62 | @if [ -f vboxvfs.ko ]; then /sbin/kldload ./vboxvfs.ko; fi
|
---|