Makefile.module revision b5fb52d8ad8e1d59326002078dc22bd69ec3c4b7
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# VirtualBox Guest Additions Module Makefile.
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# (For 2.6.x this file must be 'Makefile'!)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# Copyright (C) 2006-2007 Sun Microsystems, Inc.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync#
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# available from http://www.virtualbox.org. This file is free software;
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
565c6b62913edd14704b060e3172bba10b1fe12evboxsync#
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync# additional information or have any questions.
1c94c0a63ba68be1a7b2c640e70d7a06464e4fcavboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync#
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync# First, figure out which architecture we're targeting and the build type.
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync# (We have to support basic cross building (ARCH=i386|x86_64).)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync# While at it, warn about BUILD_* vars found to help with user problems.
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync#
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TARGET_ARCH :=
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncendif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncifeq ($(BUILD_TARGET_ARCH),)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync ifeq ($(ARCH),x86_64)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TARGET_ARCH := amd64
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync else
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync ifeq ($(ARCH),i386)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TARGET_ARCH := x86
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync else
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TARGET_ARCH := amd64
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync else
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TARGET_ARCH := x86
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync endif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync endif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync endif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncelse
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncendif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TYPE :=
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncendif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncifeq ($(BUILD_TYPE),)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync BUILD_TYPE := release
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncelse
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsyncendif
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync
66cd15f94910b1afc64c42375d40e01d5d33ad2fvboxsync
fa8e26644bdce3fe8590a2fd82433dc8bdf55414vboxsync# override is required by the Debian guys
fa8e26644bdce3fe8590a2fd82433dc8bdf55414vboxsyncoverride MODULE = vboxvfs
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncOBJS = \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync vfsmod.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync dirops.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync regops.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync utils.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync GenericRequest.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync SysHlp.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync PhysHeap.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync Init.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync VMMDev.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync HGCM.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync VBoxCalls.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync r0drv/alloc-r0drv.o \
b5fb52d8ad8e1d59326002078dc22bd69ec3c4b7vboxsync r0drv/memobj-r0drv.o \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync r0drv/linux/alloc-r0drv-linux.o \
b5fb52d8ad8e1d59326002078dc22bd69ec3c4b7vboxsync r0drv/linux/memobj-r0drv-linux.o \
b5fb52d8ad8e1d59326002078dc22bd69ec3c4b7vboxsync r0drv/linux/process-r0drv-linux.o \
565c6b62913edd14704b060e3172bba10b1fe12evboxsync r0drv/linux/semevent-r0drv-linux.o \
565c6b62913edd14704b060e3172bba10b1fe12evboxsync r0drv/linux/semfastmutex-r0drv-linux.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync divdi3.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync moddi3.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync udivdi3.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync umoddi3.o \
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync qdivrem.o
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync
e7aa635d70dd0cdf083287ec896fe8cca2775466vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncEXTRA_CFLAGS = -fshort-wchar
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncifneq ($(MAKECMDGOALS),clean)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsyncifeq ($(KERNELRELEASE),)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync #
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync # building from this directory
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync #
6ba8963f8a097b33938cd6fbcd6b63faf6d26889vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync # kernel base directory
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifndef KERN_DIR
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync KERN_DIR := /lib/modules/$(shell uname -r)/build
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync KERN_DIR := /usr/src/linux
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync $(error Error: unable to find the sources of your current Linux kernel. \
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync Specify KERN_DIR=<directory> and run Make again)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync $(warning Warning: using /usr/src/linux as the source directory of your \
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync Linux kernel. If this is not correct, specify \
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync KERN_DIR=<directory> and run Make again.)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync else
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync $(error Error: KERN_DIR does not point to a directory)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync endif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync endif
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync # includes
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifndef KERN_INCL
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync KERN_INCL = $(KERN_DIR)/include
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync $(error Error: unable to find the include directory for your current Linux \
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync kernel. Specify KERN_INCL=<directory> and run Make again)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync endif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync # module install dir.
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifndef MODULE_DIR
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync MODULE_DIR_TST := /lib/modules/$(shell uname -r)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync MODULE_DIR := $(MODULE_DIR_TST)/misc
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync else
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync $(error Unable to find the folder to install the shared folders driver to)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif # MODULE_DIR unspecified
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync # guess kernel version (24 or 26)
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync ifeq ($(shell if grep '"2\.4\.' $(KERN_INCL)/linux/version.h > /dev/null; then echo yes; fi),yes)
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync KERN_VERSION := 24
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync else
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync KERN_VERSION := 26
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync endif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsyncelse # neq($(KERNELRELEASE),)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync #
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync # building from kbuild (make -C <kernel_directory> M=`pwd`)
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync #
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync # guess kernel version (24 or 26)
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync ifeq ($(shell if grep '"2\.4\.' $(PWD)/include/linux/version.h > /dev/null; then echo yes; fi),yes)
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync KERN_VERSION := 24
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync else
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync KERN_VERSION := 26
df409c2a6d13641b0586a36103d015cc8d76da53vboxsync endif
9868c07279330f31ed91aa986bec707b7e8635a3vboxsync
9868c07279330f31ed91aa986bec707b7e8635a3vboxsyncendif # neq($(KERNELRELEASE),)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# debug - show guesses.
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncifdef DEBUG
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(warning dbg: KERN_DIR = $(KERN_DIR))
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(warning dbg: KERN_INCL = $(KERN_INCL))
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(warning dbg: MODULE_DIR = $(MODULE_DIR))
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(warning dbg: KERN_VERSION = $(KERN_VERSION))
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncendif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# Compiler options
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncifndef INCL
6e9e03fceb2e76b576905c4d3faa55ca31555956vboxsync INCL := $(addprefix -I,$(KERN_INCL) $(EXTRA_INCL))
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync ifndef KBUILD_EXTMOD
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync KBUILD_EXTMOD := $(shell pwd)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync endif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync export INCL
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncendif
d2c66e0925a76b3636d86b2afb2487fd6f956aebvboxsyncKFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
8ee0ddcf14910d47392ed78723ac40d2d46f9f48vboxsync -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE \
7e7e2d15030a41a97b964b4dff6d61c84395d687vboxsync -DIN_GUEST_R0
d2c66e0925a76b3636d86b2afb2487fd6f956aebvboxsyncifeq ($(BUILD_TARGET_ARCH),amd64)
d2c66e0925a76b3636d86b2afb2487fd6f956aebvboxsync KFLAGS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
d2c66e0925a76b3636d86b2afb2487fd6f956aebvboxsyncelse
d2c66e0925a76b3636d86b2afb2487fd6f956aebvboxsync KFLAGS += -DRT_ARCH_X86
d2c66e0925a76b3636d86b2afb2487fd6f956aebvboxsyncendif
e62e26b69d90d1f29ad146c68606d95cf47340a4vboxsyncifeq ($(BUILD_TYPE),debug)
e62e26b69d90d1f29ad146c68606d95cf47340a4vboxsyncKFLAGS += -DDEBUG
e62e26b69d90d1f29ad146c68606d95cf47340a4vboxsyncendif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncifeq ($(KERN_VERSION), 24)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# 2.4
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
0fd850701c4b07dd4cc9074734b8d98f6184055cvboxsyncCFLAGS := -O2 -DVBOX_LINUX_2_4 $(INCL) $(KFLAGS) $(KDEBUG)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncMODULE_EXT := o
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# 2.4 Module linking
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(MODULE).o: $(OBJS)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync $(LD) -o $@ -r $(OBJS)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync.PHONY: $(MODULE)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncall: $(MODULE)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(MODULE): $(MODULE).o
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncelse
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# 2.6 and later
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync#
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncMODULE_EXT := ko
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(MODULE)-y := $(OBJS)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
b1fd0840de05fc2e189d4ea55ba33c2d6b09a4d8vboxsync# special hack for FC6 2.6.18 and rhel5 2.6.18
b1fd0840de05fc2e189d4ea55ba33c2d6b09a4d8vboxsyncifeq ($(KERNELRELEASE),)
b1fd0840de05fc2e189d4ea55ba33c2d6b09a4d8vboxsync KFLAGS += $(foreach inc,$(KERN_INCL),\
b1fd0840de05fc2e189d4ea55ba33c2d6b09a4d8vboxsync $(if $(wildcard $(inc)/linux/utsrelease.h),\
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync -DKERNEL_FC6,),))
b1fd0840de05fc2e189d4ea55ba33c2d6b09a4d8vboxsyncelse
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync KFLAGS += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
7a006aff4af0ac1eaed18e272ecc9aeeaf41e4efvboxsync -DKERNEL_FC6,)
b1fd0840de05fc2e189d4ea55ba33c2d6b09a4d8vboxsyncendif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync# build defs
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncEXTRA_CFLAGS += $(INCL) $(KFLAGS) $(KDEBUG)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncall: $(MODULE)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncobj-m += $(MODULE).o
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync$(MODULE):
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync $(MAKE) KBUILD_VERBOSE=1 -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) modules
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncendif
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncinstall: $(MODULE)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync @mkdir -p $(MODULE_DIR); \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync install -m 0664 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync PATH="$(PATH):/bin:/sbin" depmod -ae;
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncendif # eq($(MAKECMDGOALS),clean)
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync
13fdd42f1fc3e519650037a920e6a54c24973866vboxsyncclean:
13fdd42f1fc3e519650037a920e6a54c24973866vboxsync for f in . linux r0drv r0drv/linux; do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done
8b21d158f0a2cf0965e0bd696837785403231cbevboxsync rm -rf .vboxvfs* .tmp_ver* vboxvfs.* Module.symvers Modules.symvers modules.order