1 | # $Id: Makefile.kmk 15589 2008-12-16 14:24:08Z 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 | SUB_DEPTH = ../../../../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 | INSTALLS += vboxadd-mod vboxadd-sh
|
---|
26 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
27 | SYSMODS += vboxadd
|
---|
28 | endif
|
---|
29 |
|
---|
30 | #
|
---|
31 | # Populate FILES_VBOXADD_NOBIN
|
---|
32 | #
|
---|
33 | include $(PATH_SUB_CURRENT)/files_vboxadd
|
---|
34 |
|
---|
35 | vboxadd-mod_INST = $(INST_ADDITIONS)src/vboxadd/
|
---|
36 | vboxadd-mod_MODE = a+r,u+w
|
---|
37 | vboxadd-mod_SOURCES = $(subst ",,$(FILES_VBOXADD_NOBIN))
|
---|
38 | vboxadd-mod_SOURCES += $(if $(VBOX_OSE),,\
|
---|
39 | $(PATH_vboxadd-mod)/dkms.conf)
|
---|
40 | vboxadd-mod_CLEAN = $(PATH_vboxadd-mod)/dkms.conf
|
---|
41 |
|
---|
42 | vboxadd-sh_INST = $(INST_ADDITIONS)src/vboxadd/
|
---|
43 | vboxadd-sh_MODE = a+rx,u+w
|
---|
44 | vboxadd-sh_SOURCES = $(subst ",,$(FILES_VBOXADD_BIN))
|
---|
45 | vboxadd-sh_SOURCES += \
|
---|
46 | $(PATH_vboxadd-sh)/build_in_tmp \
|
---|
47 | $(if $(VBOX_OSE),,\
|
---|
48 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
|
---|
49 | vboxadd-sh_CLEAN += $(PATH_vboxadd-sh)/build_in_tmp
|
---|
50 |
|
---|
51 |
|
---|
52 | #
|
---|
53 | # The module (for syntax checking).
|
---|
54 | #
|
---|
55 | vboxadd_TEMPLATE = VBOXGUESTR0
|
---|
56 | vboxadd_NOINST = 1
|
---|
57 | vboxadd_DEFS = \
|
---|
58 | MODULE IN_RT_R0 VBGL_VBOXGUEST EXPORT_SYMTAB VBGL_HGCM VBOX_WITH_HGCM \
|
---|
59 | KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
|
---|
60 | KBUILD_BASENAME=KBUILD_STR\(vboxadd\)
|
---|
61 | vboxadd_INCS = $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
62 | vboxadd_SOURCES = \
|
---|
63 | vboxmod.c \
|
---|
64 | cmc.c
|
---|
65 | vboxadd_LIBS = \
|
---|
66 | $(VBOX_LIB_VBGL_R0BASE) \
|
---|
67 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
68 |
|
---|
69 |
|
---|
70 | $$(PATH_vboxadd-sh)/build_in_tmp: \
|
---|
71 | $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
|
---|
72 | $(VBOX_VERSION_STAMP) \
|
---|
73 | | $$(dir $$@)
|
---|
74 | $(call MSG_TOOL,Creating,,$@)
|
---|
75 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxadd;g" < $< > $@
|
---|
76 | $(QUIET)chmod 0755 $@
|
---|
77 |
|
---|
78 | $$(PATH_vboxadd-mod)/dkms.conf: \
|
---|
79 | $(PATH_SUB_CURRENT)/dkms.conf \
|
---|
80 | $(VBOX_VERSION_STAMP) \
|
---|
81 | | $$(dir $$@)
|
---|
82 | $(call MSG_TOOL,Creating,,$@)
|
---|
83 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
|
---|
84 |
|
---|
85 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
86 |
|
---|