Makefile revision 9868c07279330f31ed91aa986bec707b7e8635a3
#
# Makefile for the VirtualBox Linux Host Driver.
# (For 2.6.x this file must be called 'Makefile'!)
#
#
#
# Copyright (C) 2006-2007 innotek GmbH
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# 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.
#
# The contents of this file may alternatively be used under the terms
# of the Common Development and Distribution License Version 1.0
# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
# VirtualBox OSE distribution, in which case the provisions of the
# CDDL are applicable instead of those of the GPL.
#
# You may elect to license modified versions of this file under the
# terms and conditions of either the GPL or the CDDL or both.
#
#
# First, figure out which architecture we're targeting and the build type.
# (We have to support basic cross building (ARCH=i386|x86_64).)
# While at it, warn about BUILD_* vars found to help with user problems.
#
else
else
else
else
BUILD_TYPE :=
else
OBJS = \
OBJS += \
#
# building from this directory
#
# kernel base directory
# build for the current kernel, version check
# check if versions match -- works only for later 2.6 kernels
else
# build for a dedicated kernel, no version check
# includes
# module install dir, only for current kernel
else
endif # MODULE_DIR unspecified
# guess kernel version (24 or 26)
else # neq($(KERNELRELEASE),)
#
# building from Linux-2.6-kbuild (make -C <kernel_directory> M=`pwd`)
#
KERN_VERSION := 26
endif # neq($(KERNELRELEASE),)
# debug - show guesses.
#
# Compiler options
#
KBUILD_EXTMOD := $(shell pwd)
export INCL
KFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX
KFLAGS += -DRT_ARCH_AMD64
else
KFLAGS += -DRT_ARCH_X86
#
# Use the RTR0MemObj API - testing.
#
# 2.4
MODULE_EXT := o
else
# 2.6 and later
MODULE_EXT := ko
# build defs
$(MODULE):
#
# 2.4 Module linking
#
@mkdir -p $(MODULE_DIR); \
install_rpm: $(MODULE)
@mkdir -p $(MODULE_DIR); \
endif # eq($(MAKECMDGOALS),clean)