summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/linux/sharedfolders/Makefile.kmk
blob: 61688a865ccbebd694723988928042d7584ca2af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# $Id: Makefile.kmk $
## @file
# Sub-Makefile for the vboxsf (linux shared folders module).
#

#
# Copyright (C) 2006-2012 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#

SUB_DEPTH = ../../../../..
include $(KBUILD_PATH)/subheader.kmk


#
# Populate FILES_VBOXSF_NOBIN
#
INSTALLS += vboxsf-mod
include $(PATH_SUB_CURRENT)/files_vboxsf
vboxsf-mod_INST         = $(INST_ADDITIONS)src/vboxsf/
vboxsf-mod_SOURCES      = \
	$(subst $(DQUOTE),,$(FILES_VBOXSF_NOBIN))
vboxsf-mod_EXEC_SOURCES = \
	$(subst $(DQUOTE),,$(FILES_VBOXSF_BIN)) \
	$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers


#
# The module (for syntax checking).
# The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
#
ifdef VBOX_WITH_ADDITION_DRIVERS
 SYSMODS += vboxsf
 vboxsf_TEMPLATE        = VBOXGUESTR0
 vboxsf_CFLAGS          = -fshort-wchar
 vboxsf_DEFS            = \
 	MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
 	KBUILD_MODNAME=KBUILD_STR\(vboxsf\) \
 	KBUILD_BASENAME=KBUILD_STR\(vboxsf\) \
 	DEBUG_HASH=2 DEBUG_HASH2=3
 # detect fc6 2.6.18
 vboxsf_DEFS           += \
 	$(foreach inc, $(VBOX_LINUX_INCS),\
 		$(if $(wildcard $(inc)/linux/utsrelease.h),\
 		  $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
 		               then echo yes; fi),KERNEL_FC6,),))
 # detect rhel5 2.6.18
 vboxsf_DEFS           += \
 	$(foreach inc, $(VBOX_LINUX_INCS),\
 		$(if $(wildcard $(inc)/linux/utsrelease.h),\
 		  $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
 		               then echo yes; fi),KERNEL_FC6,),))

 vboxsf_INCS            = \
 	$(PATH_ROOT)/src/VBox/Additions/common/VBoxGuestLib \
 	$(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
 vboxsf_SOURCES         = \
 	vfsmod.c \
 	utils.c \
 	dirops.c \
 	lnkops.c \
 	regops.c
 vboxsf_LIBS            = \
 	$(VBOX_LIB_VBGL_R0)
endif

#
# The mount util.
#
PROGRAMS += mount.vboxsf
mount.vboxsf_TEMPLATE    = NewVBoxGuestR3Exe
mount.vboxsf_DEFS        = _GNU_SOURCE
mount.vboxsf_SOURCES     = \
	mount.vboxsf.c \
	vbsfmount.c

include $(FILE_KBUILD_SUB_FOOTER)