Android.build.mk revision e9f7a9c340a3af11de720042fdc5061b65dc9b78
1#
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)
21ifeq ($(build_type),host)
22# Always make host multilib
23LOCAL_MULTILIB := both
24else
25LOCAL_MULTILIB := $($(module)_multilib)
26endif
27
28ifneq ($(findstring LIBRARY, $(build_target)),LIBRARY)
29ifeq ($(LOCAL_MULTILIB),both)
30    LOCAL_MODULE_STEM_32 := $(module)32
31    LOCAL_MODULE_STEM_64 := $(module)64
32endif
33endif
34
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)
88  include external/stlport/libstlport.mk
89
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
99