Makefile.kmk revision 5601bfbc69ea7f9194242feb79e89441d8d241f9
# $Id$
## @file
# Sub-Makefile for the VirtualBox Linux Guest Additions Kernel Module.
#
#
# Copyright (C) 2006-2007 Sun Microsystems, Inc.
#
# 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 (GPL) 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.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
SUB_DEPTH = ../../../../..
include $(KBUILD_PATH)/subheader.kmk
INSTALLS += vboxmod-mod vboxmod-sh
OTHERS.linux += \
$(VBOX_PATH_ADDITIONS)/src/vboxadd/build_in_tmp \
$(if $(VBOX_OSE),,$(VBOX_PATH_ADDITIONS)/src/vboxadd/dkms.conf)
ifdef VBOX_WITH_ADDITION_DRIVERS
SYSMODS += vboxadd
endif
#
# Populate FILES_VBOXADD_NOBIN
#
include $(PATH_SUB_CURRENT)/files_vboxadd
$(VBOX_PATH_ADDITIONS)/src/vboxadd/build_in_tmp: \
$(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/build_in_tmp \
$(VBOX_VERSION_STAMP) \
| $(call DIRDEP,$(VBOX_PATH_ADDITIONS)/src/vboxadd)
$(call MSG_TOOL,Creating,,$@)
$(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxadd;g" < $< > $@
$(QUIET)chmod 0755 $@
$(VBOX_PATH_ADDITIONS)/src/vboxadd/dkms.conf: \
$(PATH_SUB_CURRENT)/dkms.conf \
$(VBOX_VERSION_STAMP)
$(call MSG_TOOL,Creating,,$@)
$(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
vboxmod-mod_INST = $(INST_ADDITIONS)src/vboxadd/
vboxmod-mod_MODE = a+r,u+w
vboxmod-mod_SOURCES = $(subst ",,$(FILES_VBOXADD_NOBIN))
#
# The module (for syntax checking).
#
vboxadd_TEMPLATE = VBOXGUESTR0
vboxadd_NOINST = 1
vboxadd_DEFS = \
MODULE IN_RT_R0 VBGL_VBOXGUEST EXPORT_SYMTAB VBGL_HGCM VBOX_WITH_HGCM \
KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
KBUILD_BASENAME=KBUILD_STR\(vboxadd\)
vboxadd_INCS = $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
vboxadd_SOURCES = \
vboxmod.c \
cmc.c \
hgcmcall.c
vboxadd_LIBS = \
$(VBOX_LIB_VBGL_R0BASE) \
$(VBOX_LIB_IPRT_GUEST_R0)
include $(KBUILD_PATH)/subfooter.kmk