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