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