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