1 | # $Id: Makefile.kmk 10129 2008-07-03 03:07:18Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VirtualBox Linux Guest Additions Kernel Module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 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 | ifdef VBOX_KBUILD_HACKING
|
---|
23 | SUB_DEPTH = ../../../../..
|
---|
24 | else
|
---|
25 | DEPTH ?= ../../../../..
|
---|
26 | SUB_DEPTH = ../..
|
---|
27 | endif
|
---|
28 | include $(KBUILD_PATH)/subheader.kmk
|
---|
29 |
|
---|
30 | INSTALLS += vboxmod-mod vboxmod-sh
|
---|
31 | OTHERS.linux += \
|
---|
32 | $(VBOX_PATH_ADDITIONS)/src/vboxadd/build_in_tmp \
|
---|
33 | $(if $(VBOX_OSE),,$(VBOX_PATH_ADDITIONS)/src/vboxadd/dkms.conf)
|
---|
34 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
35 | SYSMODS += vboxadd
|
---|
36 | endif
|
---|
37 |
|
---|
38 | #
|
---|
39 | # Populate FILES_VBOXADD_NOBIN
|
---|
40 | #
|
---|
41 | include $(PATH_SUB_CURRENT)/files_vboxadd
|
---|
42 |
|
---|
43 | $(VBOX_PATH_ADDITIONS)/src/vboxadd/build_in_tmp: \
|
---|
44 | $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/build_in_tmp \
|
---|
45 | $(VBOX_VERSION_STAMP) \
|
---|
46 | | $(call DIRDEP,$(VBOX_PATH_ADDITIONS)/src/vboxadd)
|
---|
47 | $(call MSG_TOOL,Creating,,$@)
|
---|
48 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxadd;g" < $< > $@
|
---|
49 | $(QUIET)chmod 0755 $@
|
---|
50 |
|
---|
51 | $(VBOX_PATH_ADDITIONS)/src/vboxadd/dkms.conf: \
|
---|
52 | $(PATH_SUB_CURRENT)/dkms.conf \
|
---|
53 | $(VBOX_VERSION_STAMP)
|
---|
54 | $(call MSG_TOOL,Creating,,$@)
|
---|
55 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
|
---|
56 |
|
---|
57 | vboxmod-mod_INST = $(INST_ADDITIONS)src/vboxadd/
|
---|
58 | vboxmod-mod_MODE = a+r,u+w
|
---|
59 | vboxmod-mod_SOURCES = $(subst ",,$(FILES_VBOXADD_NOBIN))
|
---|
60 |
|
---|
61 | #
|
---|
62 | # The module (for syntax checking).
|
---|
63 | #
|
---|
64 | vboxadd_TEMPLATE = VBOXGUESTR0
|
---|
65 | vboxadd_NOINST = 1
|
---|
66 | vboxadd_DEFS = \
|
---|
67 | MODULE IN_RT_R0 VBGL_VBOXGUEST EXPORT_SYMTAB VBGL_HGCM VBOX_HGCM \
|
---|
68 | KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
|
---|
69 | KBUILD_BASENAME=KBUILD_STR\(vboxadd\)
|
---|
70 | vboxadd_INCS = $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
71 | vboxadd_SOURCES = \
|
---|
72 | vboxmod.c \
|
---|
73 | cmc.c \
|
---|
74 | hgcmcall.c
|
---|
75 | vboxadd_LIBS = \
|
---|
76 | $(VBOX_LIB_VBGL_R0BASE) \
|
---|
77 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
78 |
|
---|
79 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
80 |
|
---|