Android.build.mk revision 5090964da02c956f099a49b5a3eb732c0085c58b
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)
21LOCAL_MULTILIB := $($(module)_multilib)
22ifeq ($(LOCAL_MULTILIB),both)
23    LOCAL_MODULE_STEM_32 := $(module)32
24    LOCAL_MODULE_STEM_64 := $(module)64
25endif
26
27LOCAL_CLANG := $($(module)_clang_$(build_type))
28
29LOCAL_FORCE_STATIC_EXECUTABLE := $($(module)_force_static_executable)
30
31LOCAL_ADDITIONAL_DEPENDENCIES := \
32    $(LOCAL_PATH)/Android.mk \
33    $(LOCAL_PATH)/Android.build.mk \
34
35LOCAL_CFLAGS := \
36    $(common_cflags) \
37    $($(module)_cflags) \
38    $($(module)_cflags_$(build_type)) \
39
40LOCAL_CONLYFLAGS += \
41    $(common_conlyflags) \
42    $($(module)_conlyflags) \
43    $($(module)_conlyflags_$(build_type)) \
44
45LOCAL_CPPFLAGS += \
46    $(common_cppflags) \
47    $($(module)_cppflags) \
48    $($(module)_cppflags_$(build_type)) \
49
50LOCAL_C_INCLUDES := \
51    $(common_c_includes) \
52    $($(module)_c_includes) \
53    $($(module)_c_includes_$(build_type)) \
54
55LOCAL_SRC_FILES := \
56    $($(module)_src_files) \
57    $($(module)_src_files_$(build_type)) \
58
59LOCAL_STATIC_LIBRARIES := \
60    $($(module)_static_libraries) \
61    $($(module)_static_libraries_$(build_type)) \
62
63LOCAL_SHARED_LIBRARIES := \
64    $($(module)_shared_libraries) \
65    $($(module)_shared_libraries_$(build_type)) \
66
67LOCAL_WHOLE_STATIC_LIBRARIES := \
68    $($(module)_whole_static_libraries) \
69    $($(module)_whole_static_libraries_$(build_type)) \
70
71LOCAL_LDFLAGS := \
72    $($(module)_ldflags) \
73    $($(module)_ldflags_$(build_type)) \
74
75LOCAL_LDLIBS := \
76    $($(module)_ldlibs) \
77    $($(module)_ldlibs_$(build_type)) \
78
79ifeq ($(build_type),target)
80  include external/stlport/libstlport.mk
81
82  include $(BUILD_$(build_target))
83endif
84
85ifeq ($(build_type),host)
86  # Only build if host builds are supported.
87  ifeq ($(build_host),true)
88    include $(BUILD_HOST_$(build_target))
89  endif
90endif
91