1 | # $Id: Makefile.kmk 2639 2007-05-14 20:33:35Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Makefile for the vboxvfs (linux shared folders module).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006 InnoTek Systemberatung 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 as published by the Free Software Foundation,
|
---|
13 | # in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
14 | # distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
15 | # be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 | # If you received this file as part of a commercial VirtualBox
|
---|
18 | # distribution, then only the terms of your commercial VirtualBox
|
---|
19 | # license agreement apply instead of the previous paragraph.
|
---|
20 | #
|
---|
21 |
|
---|
22 | DEPTH = ../../../../..
|
---|
23 | include $(PATH_KBUILD)/header.kmk
|
---|
24 |
|
---|
25 | ifdef VBOX_WITH_LINUX_ADDITIONS_32BIT_R0
|
---|
26 | SYSMODS = vboxvfs
|
---|
27 | endif
|
---|
28 | PROGRAMS = mountvboxsf
|
---|
29 | INSTALLS = vboxvfs-bin vboxvfs-sh
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Populate FILES_VBOXVFS_NOBIN and FILES_VBOXVFS_BIN
|
---|
33 | #
|
---|
34 | include files_vboxvfs
|
---|
35 |
|
---|
36 | #
|
---|
37 | # Install the source.
|
---|
38 | #
|
---|
39 | vboxvfs-bin_INST = bin/additions/src/vboxvfs
|
---|
40 | vboxvfs-bin_MODE = a+r,u+w
|
---|
41 | vboxvfs-bin_SOURCES = $(subst ",,$(FILES_VBOXVFS_NOBIN))
|
---|
42 |
|
---|
43 | vboxvfs-sh_INST = bin/additions/src/vboxvfs
|
---|
44 | vboxvfs-sh_MODE = a+rx,u+w
|
---|
45 | vboxvfs-sh_SOURCES = $(subst ",,$(FILES_VBOXVFS_BIN))
|
---|
46 |
|
---|
47 | #
|
---|
48 | # The module (for syntax checking).
|
---|
49 | #
|
---|
50 | vboxvfs_TEMPLATE = VBOXLNX32GUESTR0
|
---|
51 | vboxvfs_DEFS := KBUILD_MODNAME=KBUILD_STR\(vboxadd\) KBUILD_BASENAME=KBUILD_STR\(vboxadd\) MODULE IN_RING0 IN_RT_R0 VBOXGUEST VBOX_HGCM
|
---|
52 | vboxvfs_LIBS = $(PATH_LIB)/VBoxGuestLibLinux.a $(PATH_LIB)/RuntimeLnx32GuestR0.a
|
---|
53 | vboxvfs_SOURCES = vfsmod.c vfs-utils.c
|
---|
54 | vboxvfs_NOINST = 1
|
---|
55 | vboxvfs_CFLAGS += -fshort-wchar
|
---|
56 | vboxvfs_INCS += \
|
---|
57 | ../../common/VBoxGuestLib \
|
---|
58 | $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
|
---|
59 |
|
---|
60 | # detect fc6 2.6.18
|
---|
61 | vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
|
---|
62 | $(if $(wildcard $(inc)/linux/utsrelease.h),\
|
---|
63 | $(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
|
---|
64 | then echo yes; fi),KERNEL_FC6,),))
|
---|
65 | # detect rhel5 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.*el5.*"' $(inc)/linux/utsrelease.h;\
|
---|
69 | then echo yes; fi),KERNEL_FC6,),))
|
---|
70 |
|
---|
71 |
|
---|
72 | #
|
---|
73 | # The mount util.
|
---|
74 | #
|
---|
75 | mountvboxsf_TEMPLATE = VBOXLNX32GUESTR3EXENOCPP
|
---|
76 | mountvboxsf_SOURCES = \
|
---|
77 | vbsfmount.h \
|
---|
78 | mount.vboxsf.c
|
---|
79 | mountvboxsf_DEFS = _GNU_SOURCE
|
---|
80 |
|
---|
81 |
|
---|
82 | include $(PATH_KBUILD)/footer.kmk
|
---|