Makefile revision f714516da18876b1836a804fc0cac5e8ff589e83
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# Makefile for the VirtualBox Linux Host Driver.
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# Copyright (C) 2006-2012 Oracle Corporation
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# available from http://www.virtualbox.org. This file is free software;
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# you can redistribute it and/or modify it under the terms of the GNU
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# General Public License (GPL) as published by the Free Software
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# The contents of this file may alternatively be used under the terms
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# of the Common Development and Distribution License Version 1.0
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
8b98c71a5a01d215eafbc3605cb7a66cc91ea774vboxsync# VirtualBox OSE distribution, in which case the provisions of the
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# CDDL are applicable instead of those of the GPL.
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# You may elect to license modified versions of this file under the
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# terms and conditions of either the GPL or the CDDL or both.
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# First, figure out which architecture we're targeting and the build type.
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# (We have to support basic cross building (ARCH=i386|x86_64).)
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# While at it, warn about BUILD_* vars found to help with user problems.
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsyncifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsyncifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
8b98c71a5a01d215eafbc3605cb7a66cc91ea774vboxsyncifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
8b98c71a5a01d215eafbc3605cb7a66cc91ea774vboxsync $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
9c0076729ec8138e89ce8a6af9a772b68f1f8dc7vboxsync# override is required by the Debian guys
export INCL
# must be consistent with Config.kmk!
$(MODULE):
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) CONFIG_MODULE_SIG= -C $(KERN_DIR) modules