blob: e65ec1673a0b22d732c547f2bc2988030b923138 [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
24else
Christopher Ferris50909642014-04-28 21:10:37 -070025LOCAL_MULTILIB := $($(module)_multilib)
Christopher Ferrise9f7a9c2014-06-10 19:46:07 -070026endif
27
28ifneq ($(findstring LIBRARY, $(build_target)),LIBRARY)
Christopher Ferris50909642014-04-28 21:10:37 -070029ifeq ($(LOCAL_MULTILIB),both)
Christopher Ferris345b49a2014-04-22 10:42:12 -070030 LOCAL_MODULE_STEM_32 := $(module)32
31 LOCAL_MODULE_STEM_64 := $(module)64
32endif
Christopher Ferrise9f7a9c2014-06-10 19:46:07 -070033endif
Christopher Ferrisf04935c2013-12-20 18:43:21 -080034
35LOCAL_CLANG := $($(module)_clang_$(build_type))
36
37LOCAL_FORCE_STATIC_EXECUTABLE := $($(module)_force_static_executable)
38
39LOCAL_ADDITIONAL_DEPENDENCIES := \
40 $(LOCAL_PATH)/Android.mk \
41 $(LOCAL_PATH)/Android.build.mk \
42
43LOCAL_CFLAGS := \
44 $(common_cflags) \
45 $($(module)_cflags) \
46 $($(module)_cflags_$(build_type)) \
47
48LOCAL_CONLYFLAGS += \
49 $(common_conlyflags) \
50 $($(module)_conlyflags) \
51 $($(module)_conlyflags_$(build_type)) \
52
53LOCAL_CPPFLAGS += \
54 $(common_cppflags) \
55 $($(module)_cppflags) \
56 $($(module)_cppflags_$(build_type)) \
57
58LOCAL_C_INCLUDES := \
59 $(common_c_includes) \
60 $($(module)_c_includes) \
61 $($(module)_c_includes_$(build_type)) \
62
63LOCAL_SRC_FILES := \
64 $($(module)_src_files) \
65 $($(module)_src_files_$(build_type)) \
66
67LOCAL_STATIC_LIBRARIES := \
68 $($(module)_static_libraries) \
69 $($(module)_static_libraries_$(build_type)) \
70
71LOCAL_SHARED_LIBRARIES := \
72 $($(module)_shared_libraries) \
73 $($(module)_shared_libraries_$(build_type)) \
74
75LOCAL_WHOLE_STATIC_LIBRARIES := \
76 $($(module)_whole_static_libraries) \
77 $($(module)_whole_static_libraries_$(build_type)) \
78
79LOCAL_LDFLAGS := \
80 $($(module)_ldflags) \
81 $($(module)_ldflags_$(build_type)) \
82
83LOCAL_LDLIBS := \
84 $($(module)_ldlibs) \
85 $($(module)_ldlibs_$(build_type)) \
86
87ifeq ($(build_type),target)
Dan Albert7a390942014-05-19 23:46:51 +000088 include external/stlport/libstlport.mk
Christopher Ferrisf04935c2013-12-20 18:43:21 -080089
90 include $(BUILD_$(build_target))
91endif
92
93ifeq ($(build_type),host)
94 # Only build if host builds are supported.
95 ifeq ($(build_host),true)
96 include $(BUILD_HOST_$(build_target))
97 endif
98endif