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