1 | # $Id: Makefile.kmk 10129 2008-07-03 03:07:18Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the vboxvfs (linux shared folders 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 | PROGRAMS += mountvboxsf
|
---|
31 | INSTALLS += vboxvfs-mod vboxvfs-sh
|
---|
32 | OTHERS.linux += \
|
---|
33 | $(VBOX_PATH_ADDITIONS)/src/vboxvfs/build_in_tmp \
|
---|
34 | $(if $(VBOX_OSE),,$(VBOX_PATH_ADDITIONS)/src/vboxvfs/dkms.conf)
|
---|
35 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
36 | SYSMODS += vboxvfs
|
---|
37 | endif
|
---|
38 |
|
---|
39 | #
|
---|
40 | # Populate FILES_VBOXVFS_NOBIN
|
---|
41 | #
|
---|
42 | include $(PATH_SUB_CURRENT)/files_vboxvfs
|
---|
43 |
|
---|
44 | $(VBOX_PATH_ADDITIONS)/src/vboxvfs/build_in_tmp: \
|
---|
45 | $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/build_in_tmp \
|
---|
46 | $(VBOX_VERSION_STAMP) \
|
---|
47 | | $(call DIRDEP,$(VBOX_PATH_ADDITIONS)/src/vboxvfs)
|
---|
48 | $(call MSG_TOOL,Creating,,$@)
|
---|
49 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxvfs;g" < $< > $@
|
---|
50 | $(QUIET)chmod 0755 $@
|
---|
51 |
|
---|
52 | $(VBOX_PATH_ADDITIONS)/src/vboxvfs/dkms.conf: \
|
---|
53 | $(PATH_SUB_CURRENT)/dkms.conf \
|
---|
54 | $(VBOX_VERSION_STAMP)
|
---|
55 | $(call MSG_TOOL,Creating,,$@)
|
---|
56 | $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
|
---|
57 |
|
---|
58 | vboxvfs-mod_INST = $(INST_ADDITIONS)src/vboxvfs/
|
---|
59 | vboxvfs-mod_MODE = a+r,u+w
|
---|
60 | vboxvfs-mod_SOURCES = $(subst ",,$(FILES_VBOXVFS_NOBIN))
|
---|
61 |
|
---|
62 |
|
---|
63 | #
|
---|
64 | # The module (for syntax checking).
|
---|
65 | #
|
---|
66 | vboxvfs_TEMPLATE = VBOXGUESTR0
|
---|
67 | vboxvfs_NOINST = 1
|
---|
68 | vboxvfs_CFLAGS = -fshort-wchar
|
---|
69 | vboxvfs_DEFS = \
|
---|
70 | MODULE IN_RT_R0 VBOXGUEST VBOX_HGCM \
|
---|
71 | KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
|
---|
72 | KBUILD_BASENAME=KBUILD_STR\(vboxadd\)
|
---|
73 | vboxvfs_INCS = \
|
---|
74 | $(PATH_ROOT)/src/VBox/Additions/common/VBoxGuestLib \
|
---|
75 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
76 | vboxvfs_SOURCES = \
|
---|
77 | vfsmod.c \
|
---|
78 | utils.c \
|
---|
79 | dirops.c \
|
---|
80 | regops.c
|
---|
81 | vboxvfs_LIBS = \
|
---|
82 | $(VBOX_LIB_VBGL_R0) \
|
---|
83 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
84 |
|
---|
85 | # detect fc6 2.6.18
|
---|
86 | vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
|
---|
87 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
88 | $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
|
---|
89 | then echo yes; fi),KERNEL_FC6,),))
|
---|
90 | # detect rhel5 2.6.18
|
---|
91 | vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
|
---|
92 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
93 | $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
|
---|
94 | then echo yes; fi),KERNEL_FC6,),))
|
---|
95 |
|
---|
96 |
|
---|
97 | #
|
---|
98 | # The mount util.
|
---|
99 | #
|
---|
100 | mountvboxsf_TEMPLATE = VBOXGUESTR3EXE
|
---|
101 | mountvboxsf_DEFS = _GNU_SOURCE
|
---|
102 | mountvboxsf_SOURCES = \
|
---|
103 | mount.vboxsf.c
|
---|
104 |
|
---|
105 |
|
---|
106 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
107 |
|
---|