Makefile revision 5cbc8e6f19327d4705c3e80af1f97ce630dd11de
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Makefile for the VirtualBox Linux Host PCI Driver.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# (For 2.6.x this file must be called 'Makefile'!)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Copyright (C) 2011 Oracle Corporation
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# available from http://www.virtualbox.org. This file is free software;
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# you can redistribute it and/or modify it under the terms of the GNU
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# General Public License (GPL) as published by the Free Software
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# First, figure out which architecture we're targeting and the build type.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# (We have to support basic cross building (ARCH=i386|x86_64).)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# While at it, warn about BUILD_* vars found to help with user problems.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TARGET_ARCH_DEF := amd64
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TARGET_ARCH_DEF := x86
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TARGET_ARCH :=
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(BUILD_TARGET_ARCH),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifeq ($(ARCH),x86_64)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TARGET_ARCH := amd64
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync else
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifeq ($(ARCH),i386)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TARGET_ARCH := x86
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync else
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TARGET_ARCH := $(BUILD_TARGET_ARCH_DEF)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TYPE :=
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(BUILD_TYPE),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync BUILD_TYPE := release
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(BUILD_TYPE),release)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# override is required by the Debian guys
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncoverride MODULE = vboxpci
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncOBJS = \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync linux/VBoxPci-linux.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync VBoxPci.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync SUPR0IdcClient.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync SUPR0IdcClientComponent.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync linux/SUPR0IdcClient-linux.o
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(BUILD_TARGET_ARCH),x86)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncOBJS += math/gcc/divdi3.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync math/gcc/moddi3.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync math/gcc/qdivrem.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync math/gcc/udivdi3.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync math/gcc/divdi3.o \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync math/gcc/umoddi3.o
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifneq ($(MAKECMDGOALS),clean)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(KERNELRELEASE),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync #
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # building from this directory
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync #
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # kernel base directory
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifndef KERN_DIR
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # build for the current kernel, version check
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KERN_DIR := /lib/modules/$(shell uname -r)/build
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KERN_DIR := /usr/src/linux
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(error Error: unable to find the sources of your current Linux kernel. \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync Specify KERN_DIR=<directory> and run Make again)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(warning Warning: using /usr/src/linux as the source directory of your \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync Linux kernel. If this is not correct, specify \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KERN_DIR=<directory> and run Make again.)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync else
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(error Error: KERN_DIR does not point to a directory)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # includes
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifndef KERN_INCL
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KERN_INCL = $(KERN_DIR)/include
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(error Error: unable to find the include directory for your current Linux \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync kernel. Specify KERN_INCL=<directory> and run Make again)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # module install dir, only for current kernel
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifndef MODULE_DIR
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync MODULE_DIR_TST := /lib/modules/$(shell uname -r)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync MODULE_DIR := $(MODULE_DIR_TST)/misc
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync else
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(error Unable to find the folder to install the support driver to)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif # MODULE_DIR unspecified
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse # neq($(KERNELRELEASE),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync #
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # building from kbuild (make -C <kernel_directory> M=`pwd`)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync #
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif # neq($(KERNELRELEASE),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# debug - show guesses.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifdef DEBUG
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync$(warning dbg: KERN_DIR = $(KERN_DIR))
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync$(warning dbg: KERN_INCL = $(KERN_INCL))
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync$(warning dbg: MODULE_DIR = $(MODULE_DIR))
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncKBUILD_VERBOSE ?= 1
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# Compiler options
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync#
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifndef INCL
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync INCL := $(addprefix -I,$(KERN_INCL) $(EXTRA_INCL))
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifndef KBUILD_EXTMOD
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KBUILD_EXTMOD := $(shell pwd)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxpci,/ /include /r0drv/linux)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync export INCL
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync MANGLING := $(KBUILD_EXTMOD)/vboxpci/include/VBox/SUPDrvMangling.h
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync MANGLING := $(KBUILD_EXTMOD)/include/VBox/SUPDrvMangling.h
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncKFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifdef VBOX_REDHAT_KABI
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KFLAGS += -DVBOX_REDHAT_KABI
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(BUILD_TARGET_ARCH),amd64)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KFLAGS += -DRT_ARCH_AMD64
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KFLAGS += -DRT_ARCH_X86
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# must be consistent with Config.kmk!
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncKFLAGS += -DVBOX_WITH_64_BITS_GUESTS
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifeq ($(BUILD_TYPE),debug)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KFLAGS += -DDEBUG -DDEBUG_$(USER) -g
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync # IPRT_DEBUG_SEMS indicates thread wrt sems state via the comm field.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync #KFLAGS += -DIPRT_DEBUG_SEMS
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# By default we use remap_pfn_range() kernel API to make kernel pages
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# visible for userland. Unfortunately, it leads to situation that
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# during debug session all structures on that page (such as PVM pointer)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# are not accessible to the debugger (see #3214).
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# This code enables experimental support
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# for vm_insert_page() kernel API, allowing to export kernel pages
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# to the userland in more debugger-friendly way. Due to stability
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# concerns, not enabled by default yet.
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncifdef VBOX_USE_INSERT_PAGE
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KFLAGS += -DVBOX_USE_INSERT_PAGE
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncMODULE_EXT := ko
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync$(MODULE)-y := $(OBJS)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync# build defs
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncEXTRA_CFLAGS += -include $(MANGLING) $(INCL) $(KFLAGS) $(KDEBUG)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncall: $(MODULE)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncobj-m += $(MODULE).o
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync$(MODULE):
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) modules
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncinstall: $(MODULE)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync @mkdir -p $(MODULE_DIR); \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync install -m 0664 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync PATH="$(PATH):/bin:/sbin" depmod -a;
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncinstall_rpm: $(MODULE)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync @mkdir -p $(MODULE_DIR); \
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync install -m 0664 $(MODULE).$(MODULE_EXT) $(MODULE_DIR)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncelse # eq ($(MAKECMDGOALS),clean)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifndef KERN_DIR
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KERN_DIR := /lib/modules/$(shell uname -r)/build
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifeq ($(wildcard $(KERN_DIR)/Makefile),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync KERN_DIR := /usr/src/linux
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync ifeq ($(wildcard $(KERN_DIR)/Makefile),)
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncclean:
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync find . \( -name \*.o -o -name \*.cmd \) -print0 | xargs -0 rm -f
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync rm -rf .tmp_ver* $(MODULE).* Module.symvers Modules.symvers modules.order
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync else
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncclean:
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) -C $(KERN_DIR) clean
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync endif
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsync
5cbc8e6f19327d4705c3e80af1f97ce630dd11devboxsyncendif # eq($(MAKECMDGOALS),clean)