1 | # $Id: Makefile.kmk 57969 2015-09-30 14:48:47Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the vboxsf (linux shared folders module).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2015 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 | SUB_DEPTH = ../../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 |
|
---|
22 | #
|
---|
23 | # Populate FILES_VBOXSF_NOBIN
|
---|
24 | #
|
---|
25 | INSTALLS += vboxsf-mod
|
---|
26 | include $(PATH_SUB_CURRENT)/files_vboxsf
|
---|
27 | vboxsf-mod_INST = $(INST_ADDITIONS)src/vboxsf/
|
---|
28 | vboxsf-mod_SOURCES = \
|
---|
29 | $(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN))
|
---|
30 | vboxsf-mod_EXEC_SOURCES = \
|
---|
31 | $(subst $(DQUOTE),,$(FILES_VBOXSF_BIN))
|
---|
32 |
|
---|
33 |
|
---|
34 | #
|
---|
35 | # The module (for syntax checking).
|
---|
36 | # The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
|
---|
37 | #
|
---|
38 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
39 | SYSMODS += vboxsf
|
---|
40 | vboxsf_TEMPLATE = VBOXGUESTR0
|
---|
41 | vboxsf_CFLAGS = -fshort-wchar
|
---|
42 | vboxsf_DEFS = \
|
---|
43 | MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
|
---|
44 | KBUILD_MODNAME=KBUILD_STR\(vboxsf\) \
|
---|
45 | KBUILD_BASENAME=KBUILD_STR\(vboxsf\) \
|
---|
46 | DEBUG_HASH=2 DEBUG_HASH2=3
|
---|
47 | # detect fc6 2.6.18
|
---|
48 | vboxsf_DEFS += \
|
---|
49 | $(foreach inc, $(VBOX_LINUX_INCS),\
|
---|
50 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
51 | $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
|
---|
52 | then echo yes; fi),KERNEL_FC6,),))
|
---|
53 | # detect rhel5 2.6.18
|
---|
54 | vboxsf_DEFS += \
|
---|
55 | $(foreach inc, $(VBOX_LINUX_INCS),\
|
---|
56 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
57 | $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
|
---|
58 | then echo yes; fi),KERNEL_FC6,),))
|
---|
59 |
|
---|
60 | vboxsf_INCS = \
|
---|
61 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuestLib \
|
---|
62 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
63 | vboxsf_SOURCES = \
|
---|
64 | vfsmod.c \
|
---|
65 | utils.c \
|
---|
66 | dirops.c \
|
---|
67 | lnkops.c \
|
---|
68 | regops.c
|
---|
69 | vboxsf_LIBS = \
|
---|
70 | $(VBOX_LIB_VBGL_R0)
|
---|
71 | endif
|
---|
72 |
|
---|
73 | #
|
---|
74 | # The mount util.
|
---|
75 | #
|
---|
76 | PROGRAMS += mount.vboxsf
|
---|
77 | mount.vboxsf_TEMPLATE = NewVBoxGuestR3Exe
|
---|
78 | mount.vboxsf_DEFS = _GNU_SOURCE
|
---|
79 | mount.vboxsf_SOURCES = \
|
---|
80 | mount.vboxsf.c \
|
---|
81 | vbsfmount.c
|
---|
82 |
|
---|
83 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
84 |
|
---|