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