blob: d4b03960d2f63d47f4e53987489b21166b731060 [file] [log] [blame]
Christopher Ferrisf04935c2013-12-20 18:43:21 -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 Ferrise9f7a9c2014-06-10 19:46:07 -070021ifeq ($(build_type),host)
22# Always make host multilib
23LOCAL_MULTILIB := both
Christopher Ferrise9f7a9c2014-06-10 19:46:07 -070024endif
25
26ifneq ($(findstring LIBRARY, $(build_target)),LIBRARY)
Christopher Ferris345b49a2014-04-22 10:42:12 -070027 LOCAL_MODULE_STEM_32 := $(module)32
28 LOCAL_MODULE_STEM_64 := $(module)64
Dmitriy Ivanov04dc91a2014-07-01 14:10:16 -070029else
30ifeq ($($(module)_install_to_out_data),true)
Ying Wangdc42e202014-07-08 18:54:42 -070031 LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(module)
32 LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(module)
Dmitriy Ivanov04dc91a2014-07-01 14:10:16 -070033endif
Christopher Ferris345b49a2014-04-22 10:42:12 -070034endif
Christopher Ferrisf04935c2013-12-20 18:43:21 -080035
36LOCAL_CLANG := $($(module)_clang_$(build_type))
37
38LOCAL_FORCE_STATIC_EXECUTABLE := $($(module)_force_static_executable)
39
Christopher Ferrisf04935c2013-12-20 18:43:21 -080040LOCAL_CFLAGS := \
41 $(common_cflags) \
42 $($(module)_cflags) \
43 $($(module)_cflags_$(build_type)) \
44
45LOCAL_CONLYFLAGS += \
46 $(common_conlyflags) \
47 $($(module)_conlyflags) \
48 $($(module)_conlyflags_$(build_type)) \
49
50LOCAL_CPPFLAGS += \
51 $(common_cppflags) \
52 $($(module)_cppflags) \
53 $($(module)_cppflags_$(build_type)) \
54
55LOCAL_C_INCLUDES := \
56 $(common_c_includes) \
57 $($(module)_c_includes) \
58 $($(module)_c_includes_$(build_type)) \
59
60LOCAL_SRC_FILES := \
61 $($(module)_src_files) \
62 $($(module)_src_files_$(build_type)) \
63
64LOCAL_STATIC_LIBRARIES := \
65 $($(module)_static_libraries) \
66 $($(module)_static_libraries_$(build_type)) \
67
68LOCAL_SHARED_LIBRARIES := \
69 $($(module)_shared_libraries) \
70 $($(module)_shared_libraries_$(build_type)) \
71
72LOCAL_WHOLE_STATIC_LIBRARIES := \
73 $($(module)_whole_static_libraries) \
74 $($(module)_whole_static_libraries_$(build_type)) \
75
76LOCAL_LDFLAGS := \
77 $($(module)_ldflags) \
78 $($(module)_ldflags_$(build_type)) \
79
80LOCAL_LDLIBS := \
81 $($(module)_ldlibs) \
82 $($(module)_ldlibs_$(build_type)) \
83
84ifeq ($(build_type),target)
Dan Albert7a390942014-05-19 23:46:51 +000085 include external/stlport/libstlport.mk
Christopher Ferrisf04935c2013-12-20 18:43:21 -080086
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