Christopher Ferris | f04935c | 2013-12-20 18:43:21 -0800 | [diff] [blame] | 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 | |
| 17 | include $(CLEAR_VARS) |
Dmitriy Ivanov | 4d0c1f6 | 2014-10-17 11:47:18 -0700 | [diff] [blame^] | 18 | LOCAL_ADDITIONAL_DEPENDENCIES := $(common_additional_dependencies) |
Christopher Ferris | f04935c | 2013-12-20 18:43:21 -0800 | [diff] [blame] | 19 | |
| 20 | LOCAL_MODULE := $(module) |
| 21 | LOCAL_MODULE_TAGS := $(module_tag) |
Christopher Ferris | e9f7a9c | 2014-06-10 19:46:07 -0700 | [diff] [blame] | 22 | ifeq ($(build_type),host) |
| 23 | # Always make host multilib |
| 24 | LOCAL_MULTILIB := both |
Christopher Ferris | e9f7a9c | 2014-06-10 19:46:07 -0700 | [diff] [blame] | 25 | endif |
| 26 | |
| 27 | ifneq ($(findstring LIBRARY, $(build_target)),LIBRARY) |
Christopher Ferris | 345b49a | 2014-04-22 10:42:12 -0700 | [diff] [blame] | 28 | LOCAL_MODULE_STEM_32 := $(module)32 |
| 29 | LOCAL_MODULE_STEM_64 := $(module)64 |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 30 | else |
| 31 | ifeq ($($(module)_install_to_out_data),true) |
Ying Wang | dc42e20 | 2014-07-08 18:54:42 -0700 | [diff] [blame] | 32 | LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(module) |
| 33 | LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(module) |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 34 | endif |
Christopher Ferris | 345b49a | 2014-04-22 10:42:12 -0700 | [diff] [blame] | 35 | endif |
Christopher Ferris | f04935c | 2013-12-20 18:43:21 -0800 | [diff] [blame] | 36 | |
| 37 | LOCAL_CLANG := $($(module)_clang_$(build_type)) |
| 38 | |
| 39 | LOCAL_FORCE_STATIC_EXECUTABLE := $($(module)_force_static_executable) |
| 40 | |
Dmitriy Ivanov | f4cb631 | 2014-09-11 15:16:03 -0700 | [diff] [blame] | 41 | ifneq ($($(module)_multilib),) |
| 42 | LOCAL_MULTILIB := $($(module)_multilib) |
| 43 | endif |
| 44 | |
Christopher Ferris | f04935c | 2013-12-20 18:43:21 -0800 | [diff] [blame] | 45 | LOCAL_CFLAGS := \ |
| 46 | $(common_cflags) \ |
| 47 | $($(module)_cflags) \ |
| 48 | $($(module)_cflags_$(build_type)) \ |
| 49 | |
| 50 | LOCAL_CONLYFLAGS += \ |
| 51 | $(common_conlyflags) \ |
| 52 | $($(module)_conlyflags) \ |
| 53 | $($(module)_conlyflags_$(build_type)) \ |
| 54 | |
| 55 | LOCAL_CPPFLAGS += \ |
| 56 | $(common_cppflags) \ |
| 57 | $($(module)_cppflags) \ |
| 58 | $($(module)_cppflags_$(build_type)) \ |
| 59 | |
| 60 | LOCAL_C_INCLUDES := \ |
| 61 | $(common_c_includes) \ |
| 62 | $($(module)_c_includes) \ |
| 63 | $($(module)_c_includes_$(build_type)) \ |
| 64 | |
| 65 | LOCAL_SRC_FILES := \ |
| 66 | $($(module)_src_files) \ |
| 67 | $($(module)_src_files_$(build_type)) \ |
| 68 | |
| 69 | LOCAL_STATIC_LIBRARIES := \ |
| 70 | $($(module)_static_libraries) \ |
| 71 | $($(module)_static_libraries_$(build_type)) \ |
| 72 | |
| 73 | LOCAL_SHARED_LIBRARIES := \ |
| 74 | $($(module)_shared_libraries) \ |
| 75 | $($(module)_shared_libraries_$(build_type)) \ |
| 76 | |
| 77 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 78 | $($(module)_whole_static_libraries) \ |
| 79 | $($(module)_whole_static_libraries_$(build_type)) \ |
| 80 | |
| 81 | LOCAL_LDFLAGS := \ |
| 82 | $($(module)_ldflags) \ |
| 83 | $($(module)_ldflags_$(build_type)) \ |
| 84 | |
| 85 | LOCAL_LDLIBS := \ |
| 86 | $($(module)_ldlibs) \ |
| 87 | $($(module)_ldlibs_$(build_type)) \ |
| 88 | |
| 89 | ifeq ($(build_type),target) |
Dan Albert | 7a39094 | 2014-05-19 23:46:51 +0000 | [diff] [blame] | 90 | include external/stlport/libstlport.mk |
Christopher Ferris | f04935c | 2013-12-20 18:43:21 -0800 | [diff] [blame] | 91 | |
| 92 | include $(BUILD_$(build_target)) |
| 93 | endif |
| 94 | |
| 95 | ifeq ($(build_type),host) |
| 96 | # Only build if host builds are supported. |
| 97 | ifeq ($(build_host),true) |
| 98 | include $(BUILD_HOST_$(build_target)) |
| 99 | endif |
| 100 | endif |