Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 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 | |
| 17 | include $(CLEAR_VARS) |
| 18 | |
| 19 | LOCAL_MODULE := $(module) |
| 20 | LOCAL_MODULE_TAGS := $(module_tag) |
Ian Rogers | 5af80aa | 2014-06-17 01:50:25 -0700 | [diff] [blame] | 21 | LOCAL_MULTILIB := $($(module)_multilib) |
Christopher Ferris | 2c43cff | 2015-03-26 19:18:36 -0700 | [diff] [blame] | 22 | ifeq ($(LOCAL_MULTILIB),both) |
Calin Juravle | 28042b5 | 2015-06-08 14:30:52 +0100 | [diff] [blame] | 23 | ifneq ($(build_target),$(filter $(build_target),SHARED_LIBRARY STATIC_LIBRARY)) |
Christopher Ferris | 2c43cff | 2015-03-26 19:18:36 -0700 | [diff] [blame] | 24 | LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32 |
| 25 | LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 |
| 26 | endif |
| 27 | endif |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 28 | |
| 29 | LOCAL_ADDITIONAL_DEPENDENCIES := \ |
| 30 | $(LOCAL_PATH)/Android.mk \ |
| 31 | $(LOCAL_PATH)/Android.build.mk \ |
| 32 | |
| 33 | LOCAL_CFLAGS := \ |
Christopher Ferris | 2c43cff | 2015-03-26 19:18:36 -0700 | [diff] [blame] | 34 | $(libbacktrace_common_cflags) \ |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 35 | $($(module)_cflags) \ |
| 36 | $($(module)_cflags_$(build_type)) \ |
| 37 | |
Stephen Hines | 035e9ba | 2015-03-31 09:39:20 -0700 | [diff] [blame] | 38 | LOCAL_CLANG_CFLAGS += \ |
| 39 | $(libbacktrace_common_clang_cflags) \ |
| 40 | |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 41 | LOCAL_CONLYFLAGS += \ |
Christopher Ferris | 2c43cff | 2015-03-26 19:18:36 -0700 | [diff] [blame] | 42 | $(libbacktrace_common_conlyflags) \ |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 43 | $($(module)_conlyflags) \ |
| 44 | $($(module)_conlyflags_$(build_type)) \ |
| 45 | |
| 46 | LOCAL_CPPFLAGS += \ |
Christopher Ferris | 2c43cff | 2015-03-26 19:18:36 -0700 | [diff] [blame] | 47 | $(libbacktrace_common_cppflags) \ |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 48 | $($(module)_cppflags) \ |
| 49 | $($(module)_cppflags_$(build_type)) \ |
| 50 | |
| 51 | LOCAL_C_INCLUDES := \ |
Christopher Ferris | 2c43cff | 2015-03-26 19:18:36 -0700 | [diff] [blame] | 52 | $(libbacktrace_common_c_includes) \ |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 53 | $($(module)_c_includes) \ |
| 54 | $($(module)_c_includes_$(build_type)) \ |
| 55 | |
| 56 | LOCAL_SRC_FILES := \ |
| 57 | $($(module)_src_files) \ |
| 58 | $($(module)_src_files_$(build_type)) \ |
| 59 | |
| 60 | LOCAL_STATIC_LIBRARIES := \ |
| 61 | $($(module)_static_libraries) \ |
| 62 | $($(module)_static_libraries_$(build_type)) \ |
| 63 | |
| 64 | LOCAL_SHARED_LIBRARIES := \ |
| 65 | $($(module)_shared_libraries) \ |
| 66 | $($(module)_shared_libraries_$(build_type)) \ |
| 67 | |
| 68 | LOCAL_LDLIBS := \ |
| 69 | $($(module)_ldlibs) \ |
| 70 | $($(module)_ldlibs_$(build_type)) \ |
| 71 | |
| 72 | ifeq ($(build_type),target) |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 73 | include $(BUILD_$(build_target)) |
| 74 | endif |
| 75 | |
| 76 | ifeq ($(build_type),host) |
| 77 | # Only build if host builds are supported. |
| 78 | ifeq ($(build_host),true) |
Andreas Gampe | dce8f29 | 2015-03-26 16:21:13 -0700 | [diff] [blame] | 79 | LOCAL_CFLAGS += -Wno-extern-c-compat -fno-omit-frame-pointer |
Christopher Ferris | 04b1e8c | 2014-01-30 01:13:33 -0800 | [diff] [blame] | 80 | include $(BUILD_HOST_$(build_target)) |
| 81 | endif |
| 82 | endif |