VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/Makefile@ 34868

Last change on this file since 34868 was 33183, checked in by vboxsync, 14 years ago

Additions/linux/Makefile: build the vboxvideo module

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1#
2# Makefile for the VirtualBox Linux 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
18ifneq ($(KBUILD_EXTMOD),)
19
20# DKMS
21
22obj-m = vboxguest/ vboxsf/ vboxvideo/
23
24else # ! KBUILD_EXTMOD
25
26KBUILD_VERBOSE =
27
28all:
29 @echo "*** Building 'vboxguest' module ***"
30 @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest
31 @if [ -f vboxguest/vboxguest.ko ]; then \
32 cp vboxguest/vboxguest.ko .; \
33 else \
34 cp vboxguest/vboxguest.o .; \
35 fi
36 @echo
37 @if [ -d vboxsf ]; then \
38 if [ -f vboxguest/Module.symvers ]; then \
39 cp vboxguest/Module.symvers vboxsf; \
40 fi; \
41 echo "*** Building 'vboxsf' module ***"; \
42 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxsf; \
43 if [ -f vboxsf/vboxsf.ko ]; then \
44 cp vboxsf/vboxsf.ko .; \
45 else \
46 cp vboxsf/vboxsf.o .; \
47 fi; \
48 fi
49 @if [ -d vboxvideo ]; then \
50 if [ -f vboxguest/Module.symvers ]; then \
51 cp vboxguest/Module.symvers vboxvideo; \
52 fi; \
53 echo "*** Building 'vboxvideo' module ***"; \
54 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvideo; \
55 if [ -f vboxvideo/vboxvideo.ko ]; then \
56 cp vboxvideo/vboxvideo.ko .; \
57 else \
58 cp vboxvideo/vboxvideo.o .; \
59 fi; \
60 fi
61
62
63install:
64 @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
65 @if [ -d vboxsf ]; then \
66 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxsf install; \
67 fi
68 @if [ -d vboxvideo ]; then \
69 $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvideo install; \
70 fi
71
72clean:
73 @$(MAKE) -C vboxguest clean
74 @if [ -d vboxsf ]; then \
75 $(MAKE) -C vboxsf clean; \
76 fi
77 @if [ -d vboxvideo ]; then \
78 $(MAKE) -C vboxvideo clean; \
79 fi
80 rm -f vboxguest.*o vboxsf.*o vboxvideo.*o
81
82load:
83 @/sbin/rmmod vboxvideo || true
84 @/sbin/rmmod vboxvfs || true
85 @/sbin/rmmod vboxsf || true
86 @/sbin/rmmod vboxguest || true
87 @/sbin/insmod vboxguest.ko
88 @if [ -f vboxsf.ko ]; then /sbin/insmod vboxsf.ko; fi
89 @if [ -f vboxvideo.ko ]; then /sbin/insmod vboxvideo.ko; fi
90
91endif # ! KBUILD_EXTMOD
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette