1 # Copyright (C) 2009 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 # this file is included multiple times by build/core/setup-app.mk 17 # 18 19 $(call ndk_log,Building application '$(NDK_APP_NAME)' for ABI '$(TARGET_ARCH_ABI)') 20 21 # Map ABIs to a target architecture 22 TARGET_ARCH_for_armeabi := arm 23 TARGET_ARCH_for_armeabi-v7a := arm 24 TARGET_ARCH_for_x86 := x86 25 26 TARGET_ARCH := $(TARGET_ARCH_for_$(TARGET_ARCH_ABI)) 27 28 TARGET_OUT := $(NDK_APP_OUT)/$(_app)/$(TARGET_ARCH_ABI) 29 30 # Special handling for x86: The minimal platform is android-9 here 31 # For now, handle this with a simple substitution. We may want to implement 32 # more general filtering in the future when introducing other ABIs. 33 TARGET_PLATFORM_SAVED := $(TARGET_PLATFORM) 34 ifeq ($(TARGET_ARCH),x86) 35 $(foreach _plat,3 4 5 8,\ 36 $(eval TARGET_PLATFORM := $$(subst android-$(_plat),android-9,$$(TARGET_PLATFORM)))\ 37 ) 38 endif 39 40 # Separate the debug and release objects. This prevents rebuilding 41 # everything when you switch between these two modes. For projects 42 # with lots of C++ sources, this can be a considerable time saver. 43 ifeq ($(NDK_APP_OPTIM),debug) 44 TARGET_OBJS := $(TARGET_OUT)/objs-debug 45 else 46 TARGET_OBJS := $(TARGET_OUT)/objs 47 endif 48 49 TARGET_GDB_SETUP := $(TARGET_OUT)/setup.gdb 50 51 include $(BUILD_SYSTEM)/setup-toolchain.mk 52 53 # Restore TARGET_PLATFORM, see above. 54 TARGET_PLATFORM := $(TARGET_PLATFORM_SAVED) 55