Makefile revision 7660cd13290282c4e2369113e71e99f59a79d58b
#
# Makefile for the VirtualBox Linux Host Driver.
# (For 2.6.x this file must be called 'Makefile'!)
#
#
#
# Copyright (C) 2006-2007 Sun Microsystems, Inc.
#
# 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.
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 USA or visit http://www.sun.com if you need
# additional information or have any questions.
#
#
# 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
# override is required by the Debian guys
OBJS = \
SUPDrv.o \
#
# 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 kbuild (make -C <kernel_directory> M=`pwd`)
#
# guess kernel version (24 or 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 -DVBOX_WITH_HARDENING
KFLAGS += -DRT_ARCH_AMD64
# must be consistent with Config.kmk!
else
KFLAGS += -DRT_ARCH_X86
# IPRT_DEBUG_SEMS indicates thread wrt sems state via the comm field.
# By default we use remap_pfn_range() kernel API to make kernel pages
# visible for userland. Unfortuately, it leads to situation that
# during debug session all structures on that page (such as PVM pointer)
# are not accessible to the debugger (see #3214).
# This code enables experimental support
# for vm_insert_page() kernel API, allowing to export kernel pages
# to the userland in more debugger-friendly way. Due to stability
# concerns, not enabled by default yet.
# 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)