1 | #
|
---|
2 | # Makefile for the VirtualBox FreeBSD Guest Drivers.
|
---|
3 | #
|
---|
4 |
|
---|
5 | #
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-2010 Oracle Corporation
|
---|
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 |
|
---|
18 | KBUILD_VERBOSE =
|
---|
19 |
|
---|
20 | all:
|
---|
21 | @echo "=== Building 'vboxguest' module ==="
|
---|
22 | @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest
|
---|
23 | @if [ -f vboxguest/vboxguest.ko ]; then \
|
---|
24 | cp vboxguest/vboxguest.ko .; \
|
---|
25 | fi
|
---|
26 | @echo
|
---|
27 | @if [ -d vboxvfs ]; then \
|
---|
28 | echo "=== Building 'vboxvfs' module ==="; \
|
---|
29 | $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \
|
---|
30 | if [ -f vboxvfs/vboxvfs.ko ]; then \
|
---|
31 | cp vboxvfs/vboxvfs.ko .; \
|
---|
32 | fi; \
|
---|
33 | fi
|
---|
34 |
|
---|
35 |
|
---|
36 | install:
|
---|
37 | @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
|
---|
38 | @if [ -d vboxvfs ]; then \
|
---|
39 | $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs install; \
|
---|
40 | fi
|
---|
41 |
|
---|
42 | clean:
|
---|
43 | @$(MAKE) -C vboxguest clean
|
---|
44 | @if [ -d vboxvfs ]; then \
|
---|
45 | $(MAKE) -C vboxvfs clean; \
|
---|
46 | fi
|
---|
47 | rm -f vboxguest.*o vboxvfs.*o
|
---|
48 |
|
---|
49 | load:
|
---|
50 | @/sbin/kldunload vboxvfs || true
|
---|
51 | @/sbin/kldunload vboxguest || true
|
---|
52 | @/sbin/kldload ./vboxguest.ko
|
---|
53 | @if [ -f vboxvfs.ko ]; then /sbin/kldload ./vboxvfs.ko; fi
|
---|