Makefile revision 88e9d91abf9293ecc1c70e0bf40e42f1c3a0bdce
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Makefile for the VirtualBox Linux Host Virtual Network Adapter Driver.
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# (For 2.6.x this file must be called 'Makefile'!)
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Copyright (C) 2006-2007 Oracle Corporation
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# This file is part of VirtualBox Open Source Edition (OSE), as
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# available from http://www.virtualbox.org. This file is free software;
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# you can redistribute it and/or modify it under the terms of the GNU
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# General Public License (GPL) as published by the Free Software
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark Andrews# Foundation, in version 2 as it comes in the "COPYING" file of the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
12178c86525332bb0ab66155feb61fbf32eca6acEvan Hunt# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# First, figure out which architecture we're targeting and the build type.
44aae046c38e796e581110b7ecdf4478167d684dBob Halley# (We have to support basic cross building (ARCH=i386|x86_64).)
c2bc56dc65b4b103a5600565680eb5f33fa4c90bMark Andrews# While at it, warn about BUILD_* vars found to help with user problems.
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halleyifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
fd35453765c6494d077edca44f4d998af5fd4cfaDavid Lawrenceifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
0e40083fdd5445703bd30e46e5bfe7d047bced12Brian Wellington $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
56b40c0185bcbd4a04422acc1211b5e2d2ba8a3eBob Halley ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
56b40c0185bcbd4a04422acc1211b5e2d2ba8a3eBob Halley $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
9f7d51ee3290e2a064d71016a6bd555b47134a7cMark Andrewsifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
44aae046c38e796e581110b7ecdf4478167d684dBob Halley $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
OBJS = \
VBOX_KERN_VER := $(shell $(MAKE) -sC $(KERN_DIR) --no-print-directory kernelrelease 2> /dev/null || true)
export INCL
KFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING
# must be consistent with Config.kmk!
$(MODULE):
# important: Don't remove Module.symvers! DKMS does 'make clean' before building ...