Makefile revision 0719c0eb4379e16255bbe0db5d76991161a787b5
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# Makefile for the VirtualBox Linux Host Driver.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# (For 2.6.x this file must be called 'Makefile'!)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# Copyright (C) 2006-2007 Sun Microsystems, Inc.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# This file is part of VirtualBox Open Source Edition (OSE), as
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# available from http://www.virtualbox.org. This file is free software;
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# you can redistribute it and/or modify it under the terms of the GNU
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# General Public License (GPL) as published by the Free Software
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# Foundation, in version 2 as it comes in the "COPYING" file of the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# The contents of this file may alternatively be used under the terms
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# of the Common Development and Distribution License Version 1.0
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# VirtualBox OSE distribution, in which case the provisions of the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# CDDL are applicable instead of those of the GPL.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# You may elect to license modified versions of this file under the
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# terms and conditions of either the GPL or the CDDL or both.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# Clara, CA 95054 USA or visit http://www.sun.com if you need
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# additional information or have any questions.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# First, figure out which architecture we're targeting and the build type.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# (We have to support basic cross building (ARCH=i386|x86_64).)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# While at it, warn about BUILD_* vars found to help with user problems.
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Rossifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Rossifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
b819cea2f73f98c5662230cc9affc8cc84f77fcfGordon Ross# override is required by the Debian guys
export INCL
KFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX
MODULE_EXT := o
$(MODULE):