Makefile.kmk revision e7aa635d70dd0cdf083287ec896fe8cca2775466
# $Id$
## @file
# Makefile for the vboxvfs (linux shared folders module).
#
#
# Copyright (C) 2006-2007 innotek GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation,
# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
# distribution. VirtualBox OSE is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY of any kind.
DEPTH = ../../../../..
include $(PATH_KBUILD)/header.kmk
ifdef VBOX_WITH_LINUX_ADDITIONS_32BIT_R0
SYSMODS = vboxvfs
endif
PROGRAMS = mountvboxsf
INSTALLS = vboxvfs-bin vboxvfs-sh
#
# Populate FILES_VBOXVFS_NOBIN and FILES_VBOXVFS_BIN
#
include files_vboxvfs
#
# Install the source.
#
vboxvfs-bin_INST = $(INST_ADDITIONS)/src/vboxvfs
vboxvfs-bin_MODE = a+r,u+w
vboxvfs-bin_SOURCES = $(subst ",,$(FILES_VBOXVFS_NOBIN))
vboxvfs-sh_INST = $(INST_ADDITIONS)/src/vboxvfs
vboxvfs-sh_MODE = a+rx,u+w
vboxvfs-sh_SOURCES = $(subst ",,$(FILES_VBOXVFS_BIN))
#
# The module (for syntax checking).
#
vboxvfs_TEMPLATE = VBOXLNX32GUESTR0
vboxvfs_DEFS := KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
KBUILD_BASENAME=KBUILD_STR\(vboxadd\) \
MODULE IN_RING0 IN_RT_R0 VBOXGUEST VBOX_HGCM
vboxvfs_LIBS = $(PATH_LIB)/VBoxGuestLibLinux.a $(PATH_LIB)/RuntimeLnx32GuestR0.a
vboxvfs_SOURCES = \
vfsmod.c \
utils.c \
dirops.c \
regops.c
vboxvfs_NOINST = 1
vboxvfs_CFLAGS += -fshort-wchar
vboxvfs_INCS += \
../../common/VBoxGuestLib \
$(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
# detect fc6 2.6.18
vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
$(if $(wildcard $(inc)/linux/utsrelease.h),\
$(if $(shell if grep -q '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h;\
then echo yes; fi),KERNEL_FC6,),))
# detect rhel5 2.6.18
vboxvfs_DEFS += $(foreach inc,$(VBOX_LINUX_INCS),\
$(if $(wildcard $(inc)/linux/utsrelease.h),\
$(if $(shell if grep -q '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h;\
then echo yes; fi),KERNEL_FC6,),))
#
# The mount util.
#
mountvboxsf_TEMPLATE = VBOXLNX32GUESTR3EXENOCPP
mountvboxsf_SOURCES = \
vbsfmount.h \
mount.vboxsf.c
mountvboxsf_DEFS = _GNU_SOURCE
include $(PATH_KBUILD)/footer.kmk