Makefile revision b3b6e2e7ee4482a4818dbed60d9795fd80baed33
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Makefile for the VirtualBox Linux Host Driver.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Copyright (C) 2006-2012 Oracle Corporation
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# This file is part of VirtualBox Open Source Edition (OSE), as
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# available from http://www.virtualbox.org. This file is free software;
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# you can redistribute it and/or modify it under the terms of the GNU
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# General Public License (GPL) as published by the Free Software
dafcb997e390efa4423883dafd100c975c4095d6Mark 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
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# The contents of this file may alternatively be used under the terms
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# of the Common Development and Distribution License Version 1.0
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# VirtualBox OSE distribution, in which case the provisions of the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# CDDL are applicable instead of those of the GPL.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# You may elect to license modified versions of this file under the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# terms and conditions of either the GPL or the CDDL or both.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# First, figure out which architecture we're targeting and the build type.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# (We have to support basic cross building (ARCH=i386|x86_64).)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# While at it, warn about BUILD_* vars found to help with user problems.
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafssonifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrewsifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssonifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# override is required by the Debian guys
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson generic/RTSemEventWaitNoResume-2-ex-generic.o \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt generic/RTSemEventMultiWaitNoResume-2-ex-generic.o \
export INCL
# must be consistent with Config.kmk!
$(MODULE):
$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) CONFIG_MODULE_SIG= -C $(KERN_DIR) modules