blob: e5ee80a091a665cbe44f6280cbd27cf24401d5df [file] [log] [blame]
Christopher Ferrisfe6ff002014-01-30 01:04:29 -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)
21
22LOCAL_ADDITIONAL_DEPENDENCIES := \
23 $(LOCAL_PATH)/Android.mk \
24 $(LOCAL_PATH)/Android.build.mk \
25
26LOCAL_CFLAGS := \
27 $(common_cflags) \
Christopher Ferrisd1c383c2014-04-09 16:48:26 -070028 $(common_cflags_$(build_type)) \
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080029 $($(module)_cflags) \
30 $($(module)_cflags_$(build_type)) \
31
32LOCAL_CONLYFLAGS += \
33 $(common_conlyflags) \
Christopher Ferrisd1c383c2014-04-09 16:48:26 -070034 $(common_conlyflags_$(build_type)) \
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080035 $($(module)_conlyflags) \
36 $($(module)_conlyflags_$(build_type)) \
37
38LOCAL_CPPFLAGS += \
39 $(common_cppflags) \
40 $($(module)_cppflags) \
41 $($(module)_cppflags_$(build_type)) \
42
43LOCAL_C_INCLUDES := \
44 $(common_c_includes) \
45 $($(module)_c_includes) \
46 $($(module)_c_includes_$(build_type)) \
47
48ifneq ($(build_type),host)
49 $(foreach arch,$(libunwind_arches), \
50 $(eval LOCAL_C_INCLUDES_$(arch) := $(common_c_includes_$(arch))))
51else
Ying Wang57c68a32014-02-21 15:53:33 -080052 $(eval LOCAL_C_INCLUDES += $(common_c_includes_$(my_host_arch)))
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080053endif
54
55LOCAL_SRC_FILES := \
56 $($(module)_src_files) \
57 $($(module)_src_files_$(build_type)) \
58
59ifneq ($(build_type),host)
60 $(foreach arch,$(libunwind_arches), \
61 $(eval LOCAL_SRC_FILES_$(arch) := $($(module)_src_files_$(arch))))
62else
Ying Wang57c68a32014-02-21 15:53:33 -080063 $(eval LOCAL_SRC_FILES += $($(module)_src_files_$(my_host_arch)))
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080064endif
65
66LOCAL_STATIC_LIBRARIES := \
67 $($(module)_static_libraries) \
68 $($(module)_static_libraries_$(build_type)) \
69
70LOCAL_SHARED_LIBRARIES := \
71 $($(module)_shared_libraries) \
72 $($(module)_shared_libraries_$(build_type)) \
73
74LOCAL_LDLIBS := \
75 $($(module)_ldlibs) \
76 $($(module)_ldlibs_$(build_type)) \
77
78# Translate arm64 to aarch64 in c includes and src files.
79LOCAL_C_INCLUDES_arm64 := \
80 $(subst tdep-arm64,tdep-aarch64,$(LOCAL_C_INCLUDES_arm64))
81
82LOCAL_SRC_FILES_arm64 := \
83 $(subst src/arm64,src/aarch64,$(LOCAL_SRC_FILES_arm64))
84
85ifeq ($(build_type),target)
86 include $(BUILD_$(build_target))
87endif
88
89ifeq ($(build_type),host)
90 # Only build if host builds are supported.
91 ifeq ($(build_host),true)
92 include $(BUILD_HOST_$(build_target))
93 endif
94endif