Makefile revision bec9452711598b56e648192360cab88a6c3535e8
# $Revision$
## @file
# VirtualBox Guest Additions Module Makefile.
#
#
# Copyright (C) 2006-2009 Oracle Corporation
#
# 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.
#
#
# 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 = \
Init.o \
SysHlp.o \
VMMDev.o \
OBJS += \
#
# building from this directory
#
# kernel base directory
else
# includes
# module install dir, only for current kernel
else
endif # MODULE_DIR unspecified
# guess kernel version (24 or 26)
KERN_VERSION := 24
else
KERN_VERSION := 26
else # neq($(KERNELRELEASE),)
#
# building from kbuild (make -C <kernel_directory> M=`pwd`)
#
# guess kernel version (24 or 26)
ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)
KERN_VERSION := 24
else
KERN_VERSION := 26
endif # neq($(KERNELRELEASE),)
# debug - show guesses.
KBUILD_VERBOSE ?= 1
#
# Compiler options
#
KBUILD_EXTMOD := $(shell pwd)
export INCL
else
KFLAGS += -DRT_ARCH_X86
#
# 2.4
#
MODULE_EXT := o
# 2.4 Module linking
else
#
# 2.6 and later
#
MODULE_EXT := ko
# build defs
$(MODULE):
@mkdir -p $(MODULE_DIR); \
endif # eq($(MAKECMDGOALS),clean)
for f in . linux r0drv r0drv/linux r0drv/generic VBox common/err common/string common/log generic common/math/gcc; \