Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2015 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 | # ----------------------------------------------------------------------------- |
| 18 | # Libraries used to test versioned symbols |
| 19 | # ----------------------------------------------------------------------------- |
| 20 | libtest_versioned_uselibv1_src_files := versioned_uselib.cpp |
| 21 | |
| 22 | libtest_versioned_uselibv1_shared_libraries := \ |
| 23 | libtest_versioned_libv1 |
| 24 | |
| 25 | module := libtest_versioned_uselibv1 |
| 26 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 27 | |
| 28 | # ----------------------------------------------------------------------------- |
| 29 | libtest_versioned_uselibv2_src_files := \ |
| 30 | versioned_uselib.cpp |
| 31 | |
| 32 | libtest_versioned_uselibv2_shared_libraries := \ |
| 33 | libtest_versioned_libv2 |
| 34 | |
| 35 | libtest_versioned_uselibv2_ldflags := \ |
| 36 | -Wl,--version-script,$(LOCAL_PATH)/versioned_uselib.map |
| 37 | |
| 38 | module := libtest_versioned_uselibv2 |
| 39 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 40 | |
| 41 | # ----------------------------------------------------------------------------- |
| 42 | libtest_versioned_uselibv2_other_src_files := \ |
| 43 | versioned_uselib.cpp |
| 44 | |
| 45 | libtest_versioned_uselibv2_other_shared_libraries := \ |
| 46 | libtest_versioned_otherlib_empty libtest_versioned_libv2 |
| 47 | |
| 48 | module := libtest_versioned_uselibv2_other |
| 49 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 50 | |
| 51 | # ----------------------------------------------------------------------------- |
| 52 | libtest_versioned_uselibv3_other_src_files := \ |
| 53 | versioned_uselib.cpp |
| 54 | |
| 55 | libtest_versioned_uselibv3_other_shared_libraries := \ |
| 56 | libtest_versioned_otherlib_empty libtest_versioned_lib |
| 57 | |
| 58 | module := libtest_versioned_uselibv3_other |
| 59 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 60 | |
| 61 | # ----------------------------------------------------------------------------- |
| 62 | # lib v1 - this one used during static linking but never used at runtime |
| 63 | # which forces libtest_versioned_uselibv1 to use function v1 from |
| 64 | # libtest_versioned_lib.so |
| 65 | # ----------------------------------------------------------------------------- |
| 66 | libtest_versioned_libv1_src_files := \ |
| 67 | versioned_lib_v1.cpp |
| 68 | |
| 69 | libtest_versioned_libv1_ldflags := \ |
| 70 | -Wl,--version-script,$(LOCAL_PATH)/versioned_lib_v1.map \ |
| 71 | -Wl,-soname,libtest_versioned_lib.so |
| 72 | |
| 73 | module := libtest_versioned_libv1 |
| 74 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 75 | |
| 76 | # ----------------------------------------------------------------------------- |
| 77 | # lib v2 - to make libtest_versioned_uselibv2.so use version 2 of versioned_function() |
| 78 | # ----------------------------------------------------------------------------- |
| 79 | libtest_versioned_libv2_src_files := \ |
| 80 | versioned_lib_v2.cpp |
| 81 | |
| 82 | libtest_versioned_libv2_ldflags := \ |
| 83 | -Wl,--version-script,$(LOCAL_PATH)/versioned_lib_v2.map \ |
| 84 | -Wl,-soname,libtest_versioned_lib.so |
| 85 | |
| 86 | module := libtest_versioned_libv2 |
| 87 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 88 | |
| 89 | |
| 90 | # ----------------------------------------------------------------------------- |
| 91 | # last version - this one is used at the runtime and exports 3 versions |
| 92 | # of versioned_symbol(). |
| 93 | # ----------------------------------------------------------------------------- |
| 94 | libtest_versioned_lib_src_files := \ |
| 95 | versioned_lib_v3.cpp |
| 96 | |
| 97 | libtest_versioned_lib_ldflags := \ |
| 98 | -Wl,--version-script,$(LOCAL_PATH)/versioned_lib_v3.map |
| 99 | |
| 100 | module := libtest_versioned_lib |
| 101 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 102 | |
| 103 | # ----------------------------------------------------------------------------- |
| 104 | # This library is empty, the actual implementation will provide an unversioned |
| 105 | # symbol for versioned_function(). |
| 106 | # ----------------------------------------------------------------------------- |
| 107 | libtest_versioned_otherlib_empty_src_files := empty.cpp |
| 108 | |
| 109 | libtest_versioned_otherlib_empty_ldflags := -Wl,-soname,libtest_versioned_otherlib.so |
| 110 | module := libtest_versioned_otherlib_empty |
| 111 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 112 | |
| 113 | # ----------------------------------------------------------------------------- |
| 114 | libtest_versioned_otherlib_src_files := versioned_lib_other.cpp |
| 115 | |
| 116 | libtest_versioned_otherlib_ldflags := \ |
| 117 | -Wl,--version-script,$(LOCAL_PATH)/versioned_lib_other.map |
| 118 | |
| 119 | module := libtest_versioned_otherlib |
| 120 | include $(LOCAL_PATH)/Android.build.testlib.mk |