blob: 18a324fe05fdfaa90e973d68dd07feaa65813966 [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)
Christopher Ferris7c042422014-04-25 13:21:40 -070021LOCAL_MULTILIB := $($(module)_multilib)
22ifeq ($(LOCAL_MULTILIB),both)
23 LOCAL_MODULE_STEM_32 := $(module)32
24 LOCAL_MODULE_STEM_64 := $(module)64
25endif
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080026
27LOCAL_ADDITIONAL_DEPENDENCIES := \
28 $(LOCAL_PATH)/Android.mk \
29 $(LOCAL_PATH)/Android.build.mk \
30
31LOCAL_CFLAGS := \
32 $(common_cflags) \
Christopher Ferrisd1c383c2014-04-09 16:48:26 -070033 $(common_cflags_$(build_type)) \
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080034 $($(module)_cflags) \
35 $($(module)_cflags_$(build_type)) \
36
37LOCAL_CONLYFLAGS += \
38 $(common_conlyflags) \
Christopher Ferrisd1c383c2014-04-09 16:48:26 -070039 $(common_conlyflags_$(build_type)) \
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080040 $($(module)_conlyflags) \
41 $($(module)_conlyflags_$(build_type)) \
42
43LOCAL_CPPFLAGS += \
44 $(common_cppflags) \
45 $($(module)_cppflags) \
46 $($(module)_cppflags_$(build_type)) \
47
48LOCAL_C_INCLUDES := \
49 $(common_c_includes) \
50 $($(module)_c_includes) \
51 $($(module)_c_includes_$(build_type)) \
52
Ying Wangeb25b732014-05-20 15:51:06 -070053$(foreach arch,$(libunwind_arches), \
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080054 $(eval LOCAL_C_INCLUDES_$(arch) := $(common_c_includes_$(arch))))
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080055
56LOCAL_SRC_FILES := \
57 $($(module)_src_files) \
58 $($(module)_src_files_$(build_type)) \
59
Ying Wangeb25b732014-05-20 15:51:06 -070060$(foreach arch,$(libunwind_arches), \
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080061 $(eval LOCAL_SRC_FILES_$(arch) := $($(module)_src_files_$(arch))))
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080062
63LOCAL_STATIC_LIBRARIES := \
64 $($(module)_static_libraries) \
65 $($(module)_static_libraries_$(build_type)) \
66
67LOCAL_SHARED_LIBRARIES := \
68 $($(module)_shared_libraries) \
69 $($(module)_shared_libraries_$(build_type)) \
70
71LOCAL_LDLIBS := \
72 $($(module)_ldlibs) \
73 $($(module)_ldlibs_$(build_type)) \
74
Dan Albert162c8cb2014-05-09 10:19:20 -070075LOCAL_LDFLAGS := \
76 $($(module)_ldflags) \
77 $($(module)_ldflags_$(build_type)) \
78
Christopher Ferrisfe6ff002014-01-30 01:04:29 -080079# Translate arm64 to aarch64 in c includes and src files.
80LOCAL_C_INCLUDES_arm64 := \
81 $(subst tdep-arm64,tdep-aarch64,$(LOCAL_C_INCLUDES_arm64))
82
83LOCAL_SRC_FILES_arm64 := \
84 $(subst src/arm64,src/aarch64,$(LOCAL_SRC_FILES_arm64))
85
86ifeq ($(build_type),target)
87 include $(BUILD_$(build_target))
88endif
89
90ifeq ($(build_type),host)
91 # Only build if host builds are supported.
92 ifeq ($(build_host),true)
93 include $(BUILD_HOST_$(build_target))
94 endif
95endif