blob: 4983b5530a787886b354fbb1387190190c6f1922 [file] [log] [blame]
Christopher Ferris04b1e8c2014-01-30 01:13:33 -08001#
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)
Ian Rogers5af80aa2014-06-17 01:50:25 -070021LOCAL_MULTILIB := $($(module)_multilib)
Christopher Ferris2c43cff2015-03-26 19:18:36 -070022ifeq ($(LOCAL_MULTILIB),both)
Calin Juravle28042b52015-06-08 14:30:52 +010023ifneq ($(build_target),$(filter $(build_target),SHARED_LIBRARY STATIC_LIBRARY))
Christopher Ferris2c43cff2015-03-26 19:18:36 -070024 LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
25 LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
26endif
27endif
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080028
29LOCAL_ADDITIONAL_DEPENDENCIES := \
30 $(LOCAL_PATH)/Android.mk \
31 $(LOCAL_PATH)/Android.build.mk \
32
33LOCAL_CFLAGS := \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070034 $(libbacktrace_common_cflags) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080035 $($(module)_cflags) \
36 $($(module)_cflags_$(build_type)) \
37
Stephen Hines035e9ba2015-03-31 09:39:20 -070038LOCAL_CLANG_CFLAGS += \
39 $(libbacktrace_common_clang_cflags) \
40
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080041LOCAL_CONLYFLAGS += \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070042 $(libbacktrace_common_conlyflags) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080043 $($(module)_conlyflags) \
44 $($(module)_conlyflags_$(build_type)) \
45
46LOCAL_CPPFLAGS += \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070047 $(libbacktrace_common_cppflags) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080048 $($(module)_cppflags) \
49 $($(module)_cppflags_$(build_type)) \
50
51LOCAL_C_INCLUDES := \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070052 $(libbacktrace_common_c_includes) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080053 $($(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)
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080073 include $(BUILD_$(build_target))
74endif
75
76ifeq ($(build_type),host)
77 # Only build if host builds are supported.
78 ifeq ($(build_host),true)
Andreas Gampedce8f292015-03-26 16:21:13 -070079 LOCAL_CFLAGS += -Wno-extern-c-compat -fno-omit-frame-pointer
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080080 include $(BUILD_HOST_$(build_target))
81 endif
82endif