Makefile.kmk revision e9de74ed58adf36ec80e630d53dc4c85d9203453
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync# $Id$
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync## @file
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# Sub-Makefile for the VirtualBox Linux Guest Additions Kernel Module.
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
9a379ef11a4bb232c8e41c12b82ec94c8e10d9a0vboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# available from http://www.virtualbox.org. This file is free software;
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# you can redistribute it and/or modify it under the terms of the GNU
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# General Public License (GPL) as published by the Free Software
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# additional information or have any questions.
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncSUB_DEPTH = ../../../../..
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncinclude $(KBUILD_PATH)/subheader.kmk
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncINSTALLS += vboxadd-mod vboxadd-sh
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncifdef VBOX_WITH_ADDITION_DRIVERS
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync SYSMODS += vboxadd
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncendif
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync# Populate FILES_VBOXADD_NOBIN
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync#
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncinclude $(PATH_SUB_CURRENT)/files_vboxadd
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-mod_INST = $(INST_ADDITIONS)src/vboxadd/
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-mod_MODE = a+r,u+w
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-mod_SOURCES = $(subst ",,$(FILES_VBOXADD_NOBIN))
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-mod_SOURCES += $(if $(VBOX_OSE),,\
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync $(PATH_vboxadd-mod)/dkms.conf)
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-mod_CLEAN = $(PATH_vboxadd-mod)/dkms.conf
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-sh_INST = $(INST_ADDITIONS)src/vboxadd/
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-sh_MODE = a+rx,u+w
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-sh_SOURCES = $(subst ",,$(FILES_VBOXADD_BIN))
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd-sh_SOURCES += \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync $(PATH_vboxadd-sh)/build_in_tmp \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(if $(VBOX_OSE),,\
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync $(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsyncvboxadd-sh_CLEAN += $(PATH_vboxadd-sh)/build_in_tmp
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync#
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync# The module (for syntax checking).
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync#
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsyncvboxadd_TEMPLATE = VBOXGUESTR0
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsyncvboxadd_NOINST = 1
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsyncvboxadd_DEFS = \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync MODULE IN_RT_R0 VBGL_VBOXGUEST EXPORT_SYMTAB VBGL_HGCM VBOX_WITH_HGCM \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync KBUILD_MODNAME=KBUILD_STR\(vboxadd\) \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync KBUILD_BASENAME=KBUILD_STR\(vboxadd\)
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd_INCS = $(PATH_ROOT)/src/VBox/Runtime/r0drv/linux
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd_SOURCES = \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync vboxmod.c \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync cmc.c
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncvboxadd_LIBS = \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(VBOX_LIB_VBGL_R0BASE) \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(VBOX_LIB_IPRT_GUEST_R0)
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync$$(PATH_vboxadd-sh)/build_in_tmp: \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(VBOX_VERSION_STAMP) \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync | $$(dir $$@)
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(call MSG_TOOL,Creating,,$@)
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxadd;g" < $< > $@
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync $(QUIET)chmod 0755 $@
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync
1f1f533d5b88c35cf740dca55c6f1937d1035a36vboxsync$$(PATH_vboxadd-mod)/dkms.conf: \
6b07d9a23ed1c650aa0a3b8de9d19f51b6b67e9fvboxsync $(PATH_SUB_CURRENT)/dkms.conf \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync $(VBOX_VERSION_STAMP) \
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync | $$(dir $$@)
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync $(call MSG_TOOL,Creating,,$@)
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" < $< > $@
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsyncinclude $(KBUILD_PATH)/subfooter.kmk
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync
930b5f872e89407f445d4000d4e4aaecaa6a0998vboxsync