VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/sharedfolders/Makefile.kmk@ 29655

Last change on this file since 29655 was 28998, checked in by vboxsync, 15 years ago

Linux Additions: rename the vboxvfs module to vboxsf to make it load by demand of the Linux kernel

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1# $Id: Makefile.kmk 28998 2010-05-04 09:44:57Z vboxsync $
2## @file
3# Sub-Makefile for the vboxsf (linux shared folders module).
4#
5
6#
7# Copyright (C) 2006-2007 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
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21PROGRAMS += mount.vboxsf
22INSTALLS += vboxsf-mod vboxsf-sh
23ifdef VBOX_WITH_ADDITION_DRIVERS
24 SYSMODS += vboxsf
25endif
26
27#
28# Populate FILES_VBOXSF_NOBIN
29#
30include $(PATH_SUB_CURRENT)/files_vboxsf
31
32vboxsf-mod_INST = $(INST_ADDITIONS)src/vboxsf/
33vboxsf-mod_MODE = a+r,u+w
34vboxsf-mod_SOURCES = $(subst ",,$(FILES_VBOXSF_NOBIN))
35vboxsf-mod_SOURCES += $(if $(VBOX_OSE),,\
36 $(PATH_vboxsf-mod)/dkms.conf)
37vboxsf-mod_CLEAN += $(PATH_vboxsf-mod)/dkms.conf
38
39vboxsf-sh_INST = $(INST_ADDITIONS)src/vboxsf/
40vboxsf-sh_MODE = a+rx,u+w
41vboxsf-sh_SOURCES = $(subst ",,$(FILES_VBOXSF_BIN))
42vboxsf-sh_SOURCES += \
43 $(PATH_vboxsf-sh)/build_in_tmp \
44 $(if $(VBOX_OSE),,\
45 $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
46vboxsf-sh_CLEAN += $(PATH_vboxsf-sh)/build_in_tmp
47
48
49#
50# The module (for syntax checking).
51# The DEBUG_HASH* stuff is for CONFIG_DYNAMIC_DEBUG-enabled kernels
52#
53vboxsf_TEMPLATE = VBOXGUESTR0
54vboxsf_NOINST = 1
55vboxsf_CFLAGS = -fshort-wchar
56vboxsf_DEFS = \
57 MODULE IN_RT_R0 VBOXGUEST VBOX_WITH_HGCM \
58 KBUILD_MODNAME=KBUILD_STR\(vboxsf\) \
59 KBUILD_BASENAME=KBUILD_STR\(vboxsf\) \
60 DEBUG_HASH=2 DEBUG_HASH2=3
61vboxsf_INCS = \
62 $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuestLib \
63 $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
64vboxsf_SOURCES = \
65 vfsmod.c \
66 utils.c \
67 dirops.c \
68 regops.c
69vboxsf_LIBS = \
70 $(VBOX_LIB_VBGL_R0)
71
72# detect fc6 2.6.18
73vboxsf_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
74 $(if $(wildcard $(inc)/linux/utsrelease.h),\
75 $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
76 then echo yes; fi),KERNEL_FC6,),))
77# detect rhel5 2.6.18
78vboxsf_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
79 $(if $(wildcard $(inc)/linux/utsrelease.h),\
80 $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
81 then echo yes; fi),KERNEL_FC6,),))
82
83
84#
85# The mount util.
86#
87mount.vboxsf_TEMPLATE = VBOXGUESTR3EXE
88mount.vboxsf_DEFS = _GNU_SOURCE
89mount.vboxsf_SOURCES = \
90 mount.vboxsf.c
91
92
93## Scripts needed for building kernel modules
94
95$$(PATH_vboxsf-sh)/build_in_tmp: \
96 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
97 $(VBOX_VERSION_STAMP) \
98 | $$(dir $$@)
99 $(call MSG_TOOL,Creating,,$@)
100 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxsf;g; s;_BUILDTYPE_;${KBUILD_TYPE};g" --output $@ $<
101 $(QUIET)chmod 0755 $@
102
103$$(PATH_vboxsf-mod)/dkms.conf: \
104 $(PATH_SUB_CURRENT)/dkms.conf \
105 $(VBOX_VERSION_STAMP) \
106 | $$(dir $$@)
107 $(call MSG_TOOL,Creating,,$@)
108 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
109
110include $(KBUILD_PATH)/subfooter.kmk
111
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