1# Copyright (C) 2010 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16# DO NOT MODIFY THIS FILE
17
18# Check that we have at least GNU Make 3.81
19# We do this by detecting whether 'lastword' is supported
20#
21MAKE_TEST := $(lastword a b c d e f)
22ifneq ($(MAKE_TEST),f)
23    $(error,The Android NDK requires GNU Make 3.81 or higher to run !)
24endif
25
26# Find the NDK root installation path, should be this file's location.
27NDK_ROOT := $(dir $(lastword $(MAKEFILE_LIST)))
28NDK_ROOT := $(NDK_ROOT:%/=%)
29
30# Complain if the path contains spaces
31ifneq ($(words $(NDK_ROOT)),1)
32    $(info,The Android NDK installation path contains spaces: '$(NDK_ROOT)')
33    $(error,Please fix the problem by reinstalling to a different location.)
34endif
35
36include $(NDK_ROOT)/build/core/main.mk
37
38# END OF FILE
39