Makefile revision 683eff3070b1b86fe71b71af7fda82766ea19d17
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# VirtualBox Guest Additions Module Makefile.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (C) 2006-2010 Oracle Corporation
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# This file is part of VirtualBox Open Source Edition (OSE), as
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# available from http://www.virtualbox.org. This file is free software;
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# you can redistribute it and/or modify it under the terms of the GNU
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# General Public License (GPL) as published by the Free Software
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Foundation, in version 2 as it comes in the "COPYING" file of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# First, figure out which architecture we're targeting and the build type.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# (We have to support basic cross building (ARCH=i386|x86_64).)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# While at it, warn about BUILD_* vars found to help with user problems.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# override is required by the Debian guys
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe generic/RTSemEventWaitNoResume-2-ex-generic.o \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe generic/RTSemEventMultiWaitNoResume-2-ex-generic.o \
ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)
export INCL
MODULE_EXT := o
$(MODULE):