1 | # $Id: Makefile.kmk 6734 2008-02-01 19:41:16Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the vboxvfs (linux shared folders module).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2007 innotek GmbH
|
---|
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 | DEPTH = ../../../../..
|
---|
19 | include $(PATH_KBUILD)/header.kmk
|
---|
20 |
|
---|
21 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
22 | SYSMODS = vboxvfs
|
---|
23 | endif
|
---|
24 | PROGRAMS = mountvboxsf
|
---|
25 | INSTALLS = vboxvfs-bin vboxvfs-sh
|
---|
26 |
|
---|
27 | #
|
---|
28 | # Populate FILES_VBOXVFS_NOBIN and FILES_VBOXVFS_BIN
|
---|
29 | #
|
---|
30 | include files_vboxvfs
|
---|
31 |
|
---|
32 | #
|
---|
33 | # Install the source.
|
---|
34 | #
|
---|
35 | vboxvfs-bin_INST = $(INST_ADDITIONS)/src/vboxvfs
|
---|
36 | vboxvfs-bin_MODE = a+r,u+w
|
---|
37 | vboxvfs-bin_SOURCES = $(subst ",,$(FILES_VBOXVFS_NOBIN))
|
---|
38 |
|
---|
39 | vboxvfs-sh_INST = $(INST_ADDITIONS)/src/vboxvfs
|
---|
40 | vboxvfs-sh_MODE = a+rx,u+w
|
---|
41 | vboxvfs-sh_SOURCES = $(subst ",,$(FILES_VBOXVFS_BIN))
|
---|
42 |
|
---|
43 | #
|
---|
44 | # The module (for syntax checking).
|
---|
45 | #
|
---|
46 | vboxvfs_TEMPLATE = VBOXGUESTR0
|
---|
47 | vboxvfs_NOINST = 1
|
---|
48 | vboxvfs_CFLAGS = -fshort-wchar
|
---|
49 | vboxvfs_DEFS = \
|
---|
50 | MODULE IN_RT_R0 VBOXGUEST VBOX_HGCM \
|
---|
51 | KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
|
---|
52 | KBUILD_BASENAME=KBUILD_STR\(vboxadd\)
|
---|
53 | vboxvfs_INCS = \
|
---|
54 | ../../common/VBoxGuestLib \
|
---|
55 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
56 | vboxvfs_SOURCES = \
|
---|
57 | vfsmod.c \
|
---|
58 | utils.c \
|
---|
59 | dirops.c \
|
---|
60 | regops.c
|
---|
61 | vboxvfs_LIBS = \
|
---|
62 | $(VBOX_LIB_VBGL_R0) \
|
---|
63 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
64 |
|
---|
65 | # detect fc6 2.6.18
|
---|
66 | vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
|
---|
67 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
68 | $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
|
---|
69 | then echo yes; fi),KERNEL_FC6,),))
|
---|
70 | # detect rhel5 2.6.18
|
---|
71 | vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
|
---|
72 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
73 | $(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
|
---|
74 | then echo yes; fi),KERNEL_FC6,),))
|
---|
75 |
|
---|
76 |
|
---|
77 | #
|
---|
78 | # The mount util.
|
---|
79 | #
|
---|
80 | mountvboxsf_TEMPLATE = VBOXGUESTR3EXE
|
---|
81 | mountvboxsf_DEFS = _GNU_SOURCE
|
---|
82 | mountvboxsf_SOURCES = \
|
---|
83 | mount.vboxsf.c
|
---|
84 |
|
---|
85 |
|
---|
86 | include $(PATH_KBUILD)/footer.kmk
|
---|