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 | |
| 20 | # ----------------------------------------------------------------------------- |
| 21 | # Library used by dlfcn tests. |
| 22 | # ----------------------------------------------------------------------------- |
| 23 | ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64)) |
| 24 | no-elf-hash-table-library_src_files := \ |
| 25 | empty.cpp \ |
| 26 | |
| 27 | no-elf-hash-table-library_ldflags := \ |
| 28 | -Wl,--hash-style=gnu \ |
| 29 | |
| 30 | module := no-elf-hash-table-library |
| 31 | module_tag := optional |
| 32 | build_type := target |
| 33 | build_target := SHARED_LIBRARY |
| 34 | include $(TEST_PATH)/Android.build.mk |
| 35 | endif |
| 36 | |
| 37 | # ----------------------------------------------------------------------------- |
| 38 | # Library used by dlext tests - with GNU RELRO program header |
| 39 | # ----------------------------------------------------------------------------- |
| 40 | libdlext_test_src_files := \ |
| 41 | dlext_test_library.cpp \ |
| 42 | |
| 43 | libdlext_test_ldflags := \ |
| 44 | -Wl,-z,relro \ |
| 45 | |
| 46 | module := libdlext_test |
| 47 | module_tag := optional |
| 48 | build_type := target |
| 49 | build_target := SHARED_LIBRARY |
| 50 | include $(TEST_PATH)/Android.build.mk |
| 51 | |
| 52 | # ----------------------------------------------------------------------------- |
| 53 | # create symlink to libdlext_test.so for symlink test |
| 54 | # ----------------------------------------------------------------------------- |
| 55 | # Use = instead of := to defer the evaluation of $@ |
| 56 | $(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD = \ |
| 57 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 58 | |
| 59 | ifneq ($(TARGET_2ND_ARCH),) |
| 60 | # link 64 bit .so |
| 61 | $(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \ |
| 62 | $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so |
| 63 | endif |
| 64 | |
| 65 | # ----------------------------------------------------------------------------- |
| 66 | # Library used by dlext tests - without GNU RELRO program header |
| 67 | # ----------------------------------------------------------------------------- |
| 68 | libdlext_test_norelro_src_files := \ |
| 69 | dlext_test_library.cpp \ |
| 70 | |
| 71 | libdlext_test_norelro_ldflags := \ |
| 72 | -Wl,-z,norelro \ |
| 73 | |
| 74 | module := libdlext_test_norelro |
| 75 | module_tag := optional |
| 76 | build_type := target |
| 77 | build_target := SHARED_LIBRARY |
| 78 | include $(TEST_PATH)/Android.build.mk |
| 79 | |
| 80 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 04dc91a | 2014-07-01 14:10:16 -0700 | [diff] [blame] | 81 | # Library used by dlext tests - different name non-default location |
| 82 | # ----------------------------------------------------------------------------- |
| 83 | libdlext_test_fd_src_files := \ |
| 84 | dlext_test_library.cpp \ |
| 85 | |
| 86 | libdlext_test_fd_install_to_out_data := true |
| 87 | module := libdlext_test_fd |
| 88 | module_tag := optional |
| 89 | build_type := target |
| 90 | build_target := SHARED_LIBRARY |
| 91 | include $(TEST_PATH)/Android.build.mk |
| 92 | |
| 93 | # ----------------------------------------------------------------------------- |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 94 | # Library used by dlfcn tests |
| 95 | # ----------------------------------------------------------------------------- |
| 96 | libtest_simple_src_files := \ |
| 97 | dlopen_testlib_simple.cpp |
| 98 | |
| 99 | module := libtest_simple |
| 100 | build_type := target |
| 101 | build_target := SHARED_LIBRARY |
| 102 | include $(TEST_PATH)/Android.build.mk |
| 103 | |
Dmitriy Ivanov | d97e9f5 | 2014-06-29 12:28:37 -0700 | [diff] [blame] | 104 | # ----------------------------------------------------------------------------- |
| 105 | # Library used to test local symbol lookup |
| 106 | # ----------------------------------------------------------------------------- |
| 107 | libtest_local_symbol_src_files := \ |
| 108 | dlsym_local_symbol_private.cpp \ |
| 109 | dlsym_local_symbol_public.cpp |
| 110 | |
| 111 | module := libtest_local_symbol |
| 112 | build_target := SHARED_LIBRARY |
| 113 | libtest_local_symbol_ldflags := -Wl,--version-script=$(LOCAL_PATH)/dlsym_local_symbol.map |
| 114 | libtest_local_symbol_cppflags := -std=gnu++11 |
| 115 | libtest_local_symbol_shared_libraries_target := libdl |
| 116 | build_type := target |
| 117 | include $(TEST_PATH)/Android.build.mk |
Dmitriy Ivanov | 1f5e1a3 | 2014-06-02 16:29:00 -0700 | [diff] [blame] | 118 | |
| 119 | # ----------------------------------------------------------------------------- |
| 120 | # Library used by atexit tests |
| 121 | # ----------------------------------------------------------------------------- |
| 122 | |
| 123 | libtest_atexit_src_files := \ |
| 124 | atexit_testlib.cpp |
| 125 | |
| 126 | module := libtest_atexit |
| 127 | build_target := SHARED_LIBRARY |
| 128 | build_type := target |
| 129 | include $(TEST_PATH)/Android.build.mk |
| 130 | build_type := host |
| 131 | include $(TEST_PATH)/Android.build.mk |
| 132 | |
Dmitriy Ivanov | ce44166 | 2014-06-17 15:56:38 -0700 | [diff] [blame] | 133 | # ----------------------------------------------------------------------------- |
| 134 | # Library with weak function |
| 135 | # ----------------------------------------------------------------------------- |
| 136 | libtest_dlsym_weak_func_src_files := \ |
| 137 | dlsym_weak_function.cpp |
| 138 | |
| 139 | module := libtest_dlsym_weak_func |
| 140 | build_target := SHARED_LIBRARY |
| 141 | build_type := target |
| 142 | include $(TEST_PATH)/Android.build.mk |
| 143 | build_type := host |
| 144 | include $(TEST_PATH)/Android.build.mk |