Makefile revision 6831f283dbc5c27bde8a8f8bea179b84a5741697
#
# Makefile for the VirtualBox Linux Host Virtual Network Adapter 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.
#
# 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 = \
#
# 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
VBOX_KERN_VER := $(shell $(MAKE) -sC $(KERN_DIR) --no-print-directory kernelrelease 2> /dev/null || true)
else
# build for a dedicated kernel, no version check
# includes
# module install dir, only for current kernel
else
endif # MODULE_DIR unspecified
else # neq($(KERNELRELEASE),)
#
# building from kbuild (make -C <kernel_directory> M=`pwd`)
#
endif # neq($(KERNELRELEASE),)
# debug - show guesses.
KBUILD_VERBOSE ?= 1
#
# 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
else
KFLAGS += -DRT_ARCH_X86
# must be consistent with Config.kmk!
# 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.
MODULE_EXT := ko
# build defs
$(MODULE):
@mkdir -p $(MODULE_DIR); \
install_rpm: $(MODULE)
@mkdir -p $(MODULE_DIR); \
endif # eq($(MAKECMDGOALS),clean)
# important: Don't remove Module.symvers! DKMS does 'make clean' before building ...