blob: ded0aac78537df28a11e94161c10169811509dbf [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)
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
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
38LOCAL_CONLYFLAGS += \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070039 $(libbacktrace_common_conlyflags) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080040 $($(module)_conlyflags) \
41 $($(module)_conlyflags_$(build_type)) \
42
43LOCAL_CPPFLAGS += \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070044 $(libbacktrace_common_cppflags) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080045 $($(module)_cppflags) \
46 $($(module)_cppflags_$(build_type)) \
47
48LOCAL_C_INCLUDES := \
Christopher Ferris2c43cff2015-03-26 19:18:36 -070049 $(libbacktrace_common_c_includes) \
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080050 $($(module)_c_includes) \
51 $($(module)_c_includes_$(build_type)) \
52
53LOCAL_SRC_FILES := \
54 $($(module)_src_files) \
55 $($(module)_src_files_$(build_type)) \
56
57LOCAL_STATIC_LIBRARIES := \
58 $($(module)_static_libraries) \
59 $($(module)_static_libraries_$(build_type)) \
60
61LOCAL_SHARED_LIBRARIES := \
62 $($(module)_shared_libraries) \
63 $($(module)_shared_libraries_$(build_type)) \
64
65LOCAL_LDLIBS := \
66 $($(module)_ldlibs) \
67 $($(module)_ldlibs_$(build_type)) \
68
69ifeq ($(build_type),target)
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080070 include $(BUILD_$(build_target))
71endif
72
73ifeq ($(build_type),host)
74 # Only build if host builds are supported.
75 ifeq ($(build_host),true)
Andreas Gampedce8f292015-03-26 16:21:13 -070076 LOCAL_CFLAGS += -Wno-extern-c-compat -fno-omit-frame-pointer
Christopher Ferris04b1e8c2014-01-30 01:13:33 -080077 include $(BUILD_HOST_$(build_target))
78 endif
79endif