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 | # ----------------------------------------------------------------------------- |
| 73 | libdlext_test_fd_src_files := \ |
| 74 | dlext_test_library.cpp \ |
| 75 | |
Dmitriy Ivanov | edfc9f6 | 2015-09-02 16:32:02 -0700 | [diff] [blame] | 76 | libdlext_test_fd_shared_libraries := libtest_simple |
| 77 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 78 | libdlext_test_fd_install_to_out_data := true |
| 79 | module := libdlext_test_fd |
| 80 | module_tag := optional |
| 81 | build_type := target |
| 82 | build_target := SHARED_LIBRARY |
| 83 | include $(TEST_PATH)/Android.build.mk |
| 84 | |
Dmitriy Ivanov | b482750 | 2015-09-28 16:38:31 -0700 | [diff] [blame] | 85 | |
| 86 | # ----------------------------------------------------------------------------- |
| 87 | # Libraries used by dlext tests for open from a zip-file |
| 88 | # ----------------------------------------------------------------------------- |
| 89 | libdlext_test_zip_src_files := \ |
| 90 | dlext_test_library.cpp \ |
| 91 | |
| 92 | libdlext_test_zip_shared_libraries := libatest_simple_zip |
| 93 | |
| 94 | libdlext_test_zip_install_to_out_data := true |
| 95 | module := libdlext_test_zip |
| 96 | module_tag := optional |
| 97 | build_type := target |
| 98 | build_target := SHARED_LIBRARY |
| 99 | include $(TEST_PATH)/Android.build.mk |
| 100 | |
| 101 | libatest_simple_zip_src_files := \ |
| 102 | dlopen_testlib_simple.cpp |
| 103 | |
| 104 | libatest_simple_zip_install_to_out_data := true |
| 105 | module := libatest_simple_zip |
| 106 | module_tag := optional |
| 107 | build_type := target |
| 108 | build_target := SHARED_LIBRARY |
| 109 | include $(TEST_PATH)/Android.build.mk |
| 110 | |
Dmitriy Ivanov | 618f1a3 | 2015-03-17 20:06:36 -0700 | [diff] [blame] | 111 | # ---------------------------------------------------------------------------- |
| 112 | # Library with soname which does not match filename |
| 113 | # ---------------------------------------------------------------------------- |
| 114 | libdlext_test_different_soname_src_files := \ |
| 115 | dlext_test_library.cpp \ |
| 116 | |
| 117 | module := libdlext_test_different_soname |
| 118 | module_tag := optional |
| 119 | libdlext_test_different_soname_ldflags := -Wl,-soname=libdlext_test_soname.so |
| 120 | include $(LOCAL_PATH)/Android.build.testlib.mk |
| 121 | |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 122 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 123 | # Library used by dlext tests - zipped and aligned |
| 124 | # ----------------------------------------------------------------------------- |
| 125 | include $(CLEAR_VARS) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 126 | bionic_2nd_arch_prefix := |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 127 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 128 | ifneq ($(TARGET_2ND_ARCH),) |
Dmitriy Ivanov | 75d66dd | 2014-10-07 09:46:46 -0700 | [diff] [blame] | 129 | bionic_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
Dmitriy Ivanov | 07e5bc1 | 2014-10-03 17:52:44 -0700 | [diff] [blame] | 130 | include $(LOCAL_PATH)/Android.build.dlext_testzip.mk |
| 131 | endif |
| 132 | |
| 133 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 42d5fcb | 2015-10-29 17:01:24 -0700 | [diff] [blame] | 134 | # Build test helper libraries for linker namespaces |
| 135 | # ----------------------------------------------------------------------------- |
| 136 | include $(LOCAL_PATH)/Android.build.linker_namespaces.mk |
| 137 | |
| 138 | # ----------------------------------------------------------------------------- |
Evgenii Stepanov | 6865082 | 2015-06-10 13:38:39 -0700 | [diff] [blame] | 139 | # Build DT_RUNPATH test helper libraries |
| 140 | # ----------------------------------------------------------------------------- |
| 141 | include $(LOCAL_PATH)/Android.build.dt_runpath.mk |
| 142 | |
| 143 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ab972b9 | 2014-11-29 13:57:41 -0800 | [diff] [blame] | 144 | # Build library with two parents |
| 145 | # ----------------------------------------------------------------------------- |
| 146 | include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk |
| 147 | |
| 148 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 149 | # Build libtest_check_order_dlsym.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 150 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 151 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 152 | |
| 153 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 154 | # Build libtest_check_order_siblings.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 155 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 156 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 157 | |
| 158 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 159 | # Build libtest_check_order_root.so with its dependencies. |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 160 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | cfa97f1 | 2014-10-21 09:23:18 -0700 | [diff] [blame] | 161 | include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk |
Dmitriy Ivanov | 14669a9 | 2014-09-05 16:42:53 -0700 | [diff] [blame] | 162 | |
| 163 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 2a81536 | 2015-04-09 13:42:33 -0700 | [diff] [blame] | 164 | # Build libtest_versioned_lib.so with its dependencies. |
| 165 | # ----------------------------------------------------------------------------- |
| 166 | include $(LOCAL_PATH)/Android.build.versioned_lib.mk |
| 167 | |
| 168 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | ea295f6 | 2014-11-20 20:47:02 -0800 | [diff] [blame] | 169 | # Build libraries needed by pthread_atfork tests |
| 170 | # ----------------------------------------------------------------------------- |
| 171 | include $(LOCAL_PATH)/Android.build.pthread_atfork.mk |
| 172 | |
| 173 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | aa0f2bd | 2014-07-28 17:32:20 -0700 | [diff] [blame] | 174 | # Library with dependency used by dlfcn tests |
| 175 | # ----------------------------------------------------------------------------- |
| 176 | libtest_with_dependency_src_files := \ |
| 177 | dlopen_testlib_simple.cpp |
| 178 | |
| 179 | libtest_with_dependency_shared_libraries := libdlext_test |
| 180 | |
| 181 | module := libtest_with_dependency |
Dmitriy Ivanov | eb27bba | 2014-09-15 14:13:24 -0700 | [diff] [blame] | 182 | include $(LOCAL_PATH)/Android.build.testlib.mk |