Makefile revision d8b66c9f4ecb096e1f2308d74df4d6a1220c3b98
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync#
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# Makefile for the VirtualBox Linux Host Virtual Network Adapter Driver.
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync# (For 2.6.x this file must be called 'Makefile'!)
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync#
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync#
d14682a025d2c801f1e777f491092d2ebbe78c3cvboxsync#
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# Copyright (C) 2006-2011 Oracle Corporation
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync#
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# available from http://www.virtualbox.org. This file is free software;
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# you can redistribute it and/or modify it under the terms of the GNU
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# General Public License (GPL) as published by the Free Software
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync#
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync#
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync# First, figure out which architecture we're targeting and the build type.
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync# (We have to support basic cross building (ARCH=i386|x86_64).)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync# While at it, warn about BUILD_* vars found to help with user problems.
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync#
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TARGET_ARCH_DEF := amd64
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncelse
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TARGET_ARCH_DEF := x86
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncendif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TARGET_ARCH :=
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncendif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncifeq ($(BUILD_TARGET_ARCH),)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync ifeq ($(ARCH),x86_64)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TARGET_ARCH := amd64
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync else
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync ifeq ($(ARCH),i386)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TARGET_ARCH := x86
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync else
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TARGET_ARCH := $(BUILD_TARGET_ARCH_DEF)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync endif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync endif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncelse
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync endif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncendif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TYPE :=
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncendif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncifeq ($(BUILD_TYPE),)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync BUILD_TYPE := release
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncelse
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync ifneq ($(BUILD_TYPE),release)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync endif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncendif
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsync# override is required by the Debian guys
5a07658d13590eba51dd98ef335a73d2a11edaa7vboxsyncoverride MODULE = vboxnetadp
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncOBJS = \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync linux/VBoxNetAdp-linux.o \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync VBoxNetAdp.o
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncifeq ($(BUILD_TARGET_ARCH),x86)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncOBJS += math/gcc/divdi3.o \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync math/gcc/moddi3.o \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync math/gcc/qdivrem.o \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync math/gcc/udivdi3.o \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync math/gcc/divdi3.o \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync math/gcc/umoddi3.o
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncendif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncifneq ($(MAKECMDGOALS),clean)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncifeq ($(KERNELRELEASE),)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync #
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync # building from this directory
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync #
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync # kernel base directory
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifndef KERN_DIR
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync # build for the current kernel, version check
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync KERN_DIR := /lib/modules/$(shell uname -r)/build
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync KERN_DIR := /usr/src/linux
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync $(error Error: unable to find the sources of your current Linux kernel. \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync Specify KERN_DIR=<directory> and run Make again)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync $(warning Warning: using /usr/src/linux as the source directory of your \
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync Linux kernel. If this is not correct, specify \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync KERN_DIR=<directory> and run Make again.)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync else
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync $(error Error: KERN_DIR does not point to a directory)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync # includes
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifndef KERN_INCL
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync KERN_INCL = $(KERN_DIR)/include
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes)
730f8be51b729e8a3c1e32c756cd0f4ec088dd4dvboxsync $(error Error: unable to find the include directory for your current Linux \
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync kernel. Specify KERN_INCL=<directory> and run Make again)
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync endif
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync # module install dir, only for current kernel
e2a74585316778e8df03715924c81e4f32292f5evboxsync ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync ifndef MODULE_DIR
e2a74585316778e8df03715924c81e4f32292f5evboxsync MODULE_DIR_TST := /lib/modules/$(shell uname -r)
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes)
8cb6f31c3048428b42c7370dfbb20e4de7254f40vboxsync MODULE_DIR := $(MODULE_DIR_TST)/misc
8cb6f31c3048428b42c7370dfbb20e4de7254f40vboxsync else
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync $(error Unable to find the folder to install the support driver to)
8cb6f31c3048428b42c7370dfbb20e4de7254f40vboxsync endif
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync endif # MODULE_DIR unspecified
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsyncelse # neq($(KERNELRELEASE),)
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync #
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync # building from kbuild (make -C <kernel_directory> M=`pwd`)
e2a74585316778e8df03715924c81e4f32292f5evboxsync #
e2a74585316778e8df03715924c81e4f32292f5evboxsync
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsyncendif # neq($(KERNELRELEASE),)
8cb6f31c3048428b42c7370dfbb20e4de7254f40vboxsync
8cb6f31c3048428b42c7370dfbb20e4de7254f40vboxsync# debug - show guesses.
8cb6f31c3048428b42c7370dfbb20e4de7254f40vboxsyncifdef DEBUG
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync$(warning dbg: KERN_DIR = $(KERN_DIR))
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync$(warning dbg: KERN_INCL = $(KERN_INCL))
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync$(warning dbg: MODULE_DIR = $(MODULE_DIR))
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsyncendif
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsyncKBUILD_VERBOSE ?= 1
18745d2ecb6a9d5f83c1c7a6f823847b9c3b4f57vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync#
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# Compiler options
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsync#
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncifndef INCL
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync INCL := $(addprefix -I,$(KERN_INCL) $(EXTRA_INCL))
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync ifndef KBUILD_EXTMOD
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync KBUILD_EXTMOD := $(shell pwd)
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync endif
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxnetadp,/ /include /r0drv/linux)
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync export INCL
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncendif
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp),)
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync MANGLING := $(KBUILD_EXTMOD)/vboxnetadp/include/VBox/SUPDrvMangling.h
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncelse
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync MANGLING := $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h
610972deee47d5e5229ccdb6c86cbb332d2b4626vboxsyncendif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncKFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING \
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync -Wno-declaration-after-statement
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncifdef VBOX_REDHAT_KABI
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync KFLAGS += -DVBOX_REDHAT_KABI
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncendif
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncifeq ($(BUILD_TARGET_ARCH),amd64)
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync KFLAGS += -DRT_ARCH_AMD64
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncelse
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync KFLAGS += -DRT_ARCH_X86
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsyncendif
bcd589d9db90b68d3af5d6839c1d613bb64d4c04vboxsync# must be consistent with Config.kmk!
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncKFLAGS += -DVBOX_WITH_64_BITS_GUESTS
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncifeq ($(BUILD_TYPE),debug)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync KFLAGS += -DDEBUG -DDEBUG_$(USER) -g
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync # IPRT_DEBUG_SEMS indicates thread wrt sems state via the comm field.
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync #KFLAGS += -DIPRT_DEBUG_SEMS
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncendif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# By default we use remap_pfn_range() kernel API to make kernel pages
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# visible for userland. Unfortunately, it leads to situation that
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# during debug session all structures on that page (such as PVM pointer)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# are not accessible to the debugger (see #3214).
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# This code enables experimental support
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# for vm_insert_page() kernel API, allowing to export kernel pages
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# to the userland in more debugger-friendly way. Due to stability
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# concerns, not enabled by default yet.
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncifdef VBOX_USE_INSERT_PAGE
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync KFLAGS += -DVBOX_USE_INSERT_PAGE
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncendif
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncMODULE_EXT := ko
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync$(MODULE)-y := $(OBJS)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync# build defs
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncEXTRA_CFLAGS += -include $(MANGLING) $(INCL) $(KFLAGS) $(KDEBUG)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncall: $(MODULE)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncobj-m += $(MODULE).o
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
2f4c1bacd54af5063c3185cc8eab03e4e8ef9b90vboxsync# OL/UEK: disable module signing for external modules -- we don't have any private key
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync$(MODULE):
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) CONFIG_MODULE_SIG= -C $(KERN_DIR) modules
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsyncinstall: $(MODULE)
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync @mkdir -p $(MODULE_DIR); \
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync install -m 0664 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync PATH="$(PATH):/bin:/sbin" depmod -a; \
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync rm -f /etc/vbox/module_not_compiled
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsyncinstall_rpm: $(MODULE)
cbc215af8423a8326b27143c59c5d8fc9ffb0279vboxsync @mkdir -p $(MODULE_DIR); \
2f4c1bacd54af5063c3185cc8eab03e4e8ef9b90vboxsync install -m 0664 $(MODULE).$(MODULE_EXT) $(MODULE_DIR)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
2f4c1bacd54af5063c3185cc8eab03e4e8ef9b90vboxsyncelse # eq ($(MAKECMDGOALS),clean)
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync ifndef KERN_DIR
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync KERN_DIR := /lib/modules/$(shell uname -r)/build
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync ifeq ($(wildcard $(KERN_DIR)/Makefile),)
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync KERN_DIR := /usr/src/linux
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync endif
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync endif
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync ifeq ($(wildcard $(KERN_DIR)/Makefile),)
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncclean:
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync find . \( -name \*.o -o -name \*.cmd \) -print0 | xargs -0 rm -f
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync rm -rf .tmp_ver* $(MODULE).* Module.symvers Modules.symvers modules.order
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync else
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsyncclean:
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) clean
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync
6ba96ad7028e4d559a5998de4bab0b71a8251c99vboxsync endif
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsyncendif # eq($(MAKECMDGOALS),clean)
ece707b8d97e63ed54d4b48d7a8d841187e0023cvboxsync