1# 2# Copyright (C) 2014 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17include $(CLEAR_VARS) 18 19LOCAL_MODULE := $(module) 20LOCAL_MODULE_TAGS := $(module_tag) 21LOCAL_MULTILIB := $($(module)_multilib) 22ifeq ($(LOCAL_MULTILIB),both) 23ifneq ($(build_target),$(filter $(build_target),SHARED_LIBRARY STATIC_LIBRRARY)) 24 LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32 25 LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 26endif 27endif 28 29LOCAL_ADDITIONAL_DEPENDENCIES := \ 30 $(LOCAL_PATH)/Android.mk \ 31 $(LOCAL_PATH)/Android.build.mk \ 32 33LOCAL_CFLAGS := \ 34 $(libbacktrace_common_cflags) \ 35 $($(module)_cflags) \ 36 $($(module)_cflags_$(build_type)) \ 37 38LOCAL_CLANG_CFLAGS += \ 39 $(libbacktrace_common_clang_cflags) \ 40 41LOCAL_CONLYFLAGS += \ 42 $(libbacktrace_common_conlyflags) \ 43 $($(module)_conlyflags) \ 44 $($(module)_conlyflags_$(build_type)) \ 45 46LOCAL_CPPFLAGS += \ 47 $(libbacktrace_common_cppflags) \ 48 $($(module)_cppflags) \ 49 $($(module)_cppflags_$(build_type)) \ 50 51LOCAL_C_INCLUDES := \ 52 $(libbacktrace_common_c_includes) \ 53 $($(module)_c_includes) \ 54 $($(module)_c_includes_$(build_type)) \ 55 56LOCAL_SRC_FILES := \ 57 $($(module)_src_files) \ 58 $($(module)_src_files_$(build_type)) \ 59 60LOCAL_STATIC_LIBRARIES := \ 61 $($(module)_static_libraries) \ 62 $($(module)_static_libraries_$(build_type)) \ 63 64LOCAL_SHARED_LIBRARIES := \ 65 $($(module)_shared_libraries) \ 66 $($(module)_shared_libraries_$(build_type)) \ 67 68LOCAL_LDLIBS := \ 69 $($(module)_ldlibs) \ 70 $($(module)_ldlibs_$(build_type)) \ 71 72ifeq ($(build_type),target) 73 include $(BUILD_$(build_target)) 74endif 75 76ifeq ($(build_type),host) 77 # Only build if host builds are supported. 78 ifeq ($(build_host),true) 79 LOCAL_CFLAGS += -Wno-extern-c-compat -fno-omit-frame-pointer 80 include $(BUILD_HOST_$(build_target)) 81 endif 82endif 83