1 | #
|
---|
2 | # Makefile for the VirtualBox FreeBSD Guest Drivers.
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | # Copyright (C) 2009-2022 Oracle Corporation
|
---|
7 | #
|
---|
8 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | # available from http://www.virtualbox.org. This file is free software;
|
---|
10 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | # General Public License (GPL) as published by the Free Software
|
---|
12 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | #
|
---|
16 |
|
---|
17 | KBUILD_VERBOSE =
|
---|
18 |
|
---|
19 | all:
|
---|
20 | @echo "=== Building 'vboxguest' module ==="
|
---|
21 | @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest
|
---|
22 | @if [ -f vboxguest/vboxguest.ko ]; then \
|
---|
23 | cp vboxguest/vboxguest.ko .; \
|
---|
24 | fi
|
---|
25 | @echo
|
---|
26 | @if [ -d vboxvfs ]; then \
|
---|
27 | echo "=== Building 'vboxvfs' module ==="; \
|
---|
28 | $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \
|
---|
29 | if [ -f vboxvfs/vboxvfs.ko ]; then \
|
---|
30 | cp vboxvfs/vboxvfs.ko .; \
|
---|
31 | fi; \
|
---|
32 | fi
|
---|
33 |
|
---|
34 |
|
---|
35 | install:
|
---|
36 | @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
|
---|
37 | @if [ -d vboxvfs ]; then \
|
---|
38 | $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs install; \
|
---|
39 | fi
|
---|
40 |
|
---|
41 | clean:
|
---|
42 | @$(MAKE) -C vboxguest clean
|
---|
43 | @if [ -d vboxvfs ]; then \
|
---|
44 | $(MAKE) -C vboxvfs clean; \
|
---|
45 | fi
|
---|
46 | rm -f vboxguest.*o vboxvfs.*o
|
---|
47 |
|
---|
48 | load:
|
---|
49 | @/sbin/kldunload vboxvfs || true
|
---|
50 | @/sbin/kldunload vboxguest || true
|
---|
51 | @/sbin/kldload ./vboxguest.ko
|
---|
52 | @if [ -f vboxvfs.ko ]; then /sbin/kldload ./vboxvfs.ko; fi
|
---|