Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2012 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 | LOCAL_PATH := $(call my-dir) |
| 18 | TEST_PATH := $(LOCAL_PATH)/.. |
| 19 | |
Dan Albert | 5341691 | 2015-08-10 16:40:06 -0700 | [diff] [blame] | 20 | common_cppflags := |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 21 | common_additional_dependencies := \ |
| 22 | $(LOCAL_PATH)/Android.mk \ |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 23 | $(LOCAL_PATH)/Android.build.dt_runpath.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 24 | $(LOCAL_PATH)/Android.build.dlext_testzip.mk \ |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 25 | $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk \ |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 26 | $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk \ |
| 27 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk \ |
| 28 | $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk \ |
Dmitriy Ivanov | 42d5fcb | 2015-10-29 17:01:24 -0700 | [diff] [blame] | 29 | $(LOCAL_PATH)/Android.build.linker_namespaces.mk \ |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 30 | $(LOCAL_PATH)/Android.build.pthread_atfork.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 31 | $(LOCAL_PATH)/Android.build.testlib.mk \ |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 32 | $(LOCAL_PATH)/Android.build.versioned_lib.mk \ |
Dmitriy Ivanov | 4a9e193 | 2014-10-17 11:47:18 -0700 | [diff] [blame] | 33 | $(TEST_PATH)/Android.build.mk |
| 34 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 35 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 36 | # Library used by dlext tests - with GNU RELRO program header |
| 37 | # ----------------------------------------------------------------------------- |
| 38 | libdlext_test_src_files := \ |
| 39 | dlext_test_library.cpp \ |
| 40 | |
| 41 | libdlext_test_ldflags := \ |
| 42 | -Wl,-z,relro \ |
| 43 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 44 | libdlext_test_shared_libraries := libtest_simple |
| 45 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 46 | module := libdlext_test |
| 47 | module_tag := optional |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 48 | include $(LOCAL_PATH)/Android.build.testlib.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 49 | |
| 50 | # ----------------------------------------------------------------------------- |
| 51 | # create symlink to libdlext_test.so for symlink test |
| 52 | # ----------------------------------------------------------------------------- |
| 53 | # Use = instead of := to defer the evaluation of $@ |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 54 | $(TARGET_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 55 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 56 | |
| 57 | ifneq ($(TARGET_2ND_ARCH),) |
| 58 | # link 64 bit .so |
| 59 | $(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 60 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 61 | endif |
| 62 | |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 63 | # host symlinks |
| 64 | $(HOST_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 65 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 66 | |
| 67 | $(HOST_OUT)/lib/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 68 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 69 | |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 70 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 71 | # Library used by dlext tests - different name non-default location |
| 72 | # ----------------------------------------------------------------------------- |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 73 | module := libdlext_test_fd |
| 74 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 75 | libdlext_test_fd_src_files := \ |
| 76 | dlext_test_library.cpp \ |
| 77 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 78 | libdlext_test_fd_shared_libraries := libtest_simple |
| 79 | |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 80 | libdlext_test_fd_install_to_out_data_dir := $(module) |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 81 | module_tag := optional |
| 82 | build_type := target |
| 83 | build_target := SHARED_LIBRARY |
| 84 | include $(TEST_PATH)/Android.build.mk |
| 85 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 86 | |
| 87 | # ----------------------------------------------------------------------------- |
| 88 | # Libraries used by dlext tests for open from a zip-file |
| 89 | # ----------------------------------------------------------------------------- |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 90 | module := libdlext_test_zip |
| 91 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 92 | libdlext_test_zip_src_files := \ |
| 93 | dlext_test_library.cpp \ |
| 94 | |
| 95 | libdlext_test_zip_shared_libraries := libatest_simple_zip |
| 96 | |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 97 | libdlext_test_zip_install_to_out_data_dir := $(module) |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 98 | module_tag := optional |
| 99 | build_type := target |
| 100 | build_target := SHARED_LIBRARY |
| 101 | include $(TEST_PATH)/Android.build.mk |
| 102 | |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 103 | module := libatest_simple_zip |
| 104 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 105 | libatest_simple_zip_src_files := \ |
| 106 | dlopen_testlib_simple.cpp |
| 107 | |
Dimitry Ivanov | b16e443 | 2016-08-29 13:15:38 -0700 | [diff] [blame] | 108 | libatest_simple_zip_install_to_out_data_dir := $(module) |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 109 | module_tag := optional |
| 110 | build_type := target |
| 111 | build_target := SHARED_LIBRARY |
| 112 | include $(TEST_PATH)/Android.build.mk |
| 113 | |
Dmitriy Ivanov | 618f1a3 | 2015-03-17 20:06:36 -0700 | [diff] [blame] | 114 | # ---------------------------------------------------------------------------- |
| 115 | # Library with soname which does not match filename |
| 116 | # ---------------------------------------------------------------------------- |
| 117 | libdlext_test_different_soname_src_files := \ |
| 118 | dlext_test_library.cpp \ |
| 119 | |
| 120 | module := libdlext_test_different_soname |
| 121 | module_tag := optional |
| 122 | libdlext_test_different_soname_ldflags := -Wl,-soname=libdlext_test_soname.so |
| 123 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 124 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 125 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 126 | # Library used by dlext tests - zipped and aligned |
| 127 | # ----------------------------------------------------------------------------- |
| 128 | include $(CLEAR_VARS) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 129 | bionic_2nd_arch_prefix := |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 130 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 131 | ifneq ($(TARGET_2ND_ARCH),) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 132 | bionic_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 133 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 134 | endif |
| 135 | |
| 136 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 42d5fcb | 2015-10-29 17:01:24 -0700 | [diff] [blame] | 137 | # Build test helper libraries for linker namespaces |
| 138 | # ----------------------------------------------------------------------------- |
| 139 | include $(LOCAL_PATH)/Android.build.linker_namespaces.mk |
| 140 | |
| 141 | # ----------------------------------------------------------------------------- |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 142 | # Build DT_RUNPATH test helper libraries |
| 143 | # ----------------------------------------------------------------------------- |
| 144 | include $(LOCAL_PATH)/Android.build.dt_runpath.mk |
| 145 | |
| 146 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 147 | # Build library with two parents |
| 148 | # ----------------------------------------------------------------------------- |
| 149 | include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk |
| 150 | |
| 151 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 152 | # Build libtest_check_order_dlsym.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 153 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 154 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 155 | |
| 156 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 157 | # Build libtest_check_order_siblings.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 158 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 159 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 160 | |
| 161 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 162 | # Build libtest_check_order_root.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 163 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 164 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 165 | |
| 166 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 167 | # Build libtest_versioned_lib.so with its dependencies. |
| 168 | # ----------------------------------------------------------------------------- |
| 169 | include $(LOCAL_PATH)/Android.build.versioned_lib.mk |
| 170 | |
| 171 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 172 | # Build libraries needed by pthread_atfork tests |
| 173 | # ----------------------------------------------------------------------------- |
| 174 | include $(LOCAL_PATH)/Android.build.pthread_atfork.mk |
| 175 | |
| 176 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 177 | # Library with dependency used by dlfcn tests |
| 178 | # ----------------------------------------------------------------------------- |
| 179 | libtest_with_dependency_src_files := \ |
| 180 | dlopen_testlib_simple.cpp |
| 181 | |
| 182 | libtest_with_dependency_shared_libraries := libdlext_test |
| 183 | |
| 184 | module := libtest_with_dependency |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 185 | include $(LOCAL_PATH)/Android.build.testlib.mk |