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 17LOCAL_PATH := $(call my-dir) 18TEST_PATH := $(LOCAL_PATH)/.. 19 20common_cppflags := 21common_additional_dependencies := \ 22 $(LOCAL_PATH)/Android.mk \ 23 $(LOCAL_PATH)/Android.build.dt_runpath.mk \ 24 $(LOCAL_PATH)/Android.build.dlext_testzip.mk \ 25 $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk \ 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 \ 29 $(LOCAL_PATH)/Android.build.linker_namespaces.mk \ 30 $(LOCAL_PATH)/Android.build.pthread_atfork.mk \ 31 $(LOCAL_PATH)/Android.build.testlib.mk \ 32 $(LOCAL_PATH)/Android.build.testlib.target.mk \ 33 $(LOCAL_PATH)/Android.build.versioned_lib.mk \ 34 $(TEST_PATH)/Android.build.mk 35 36# ----------------------------------------------------------------------------- 37# Library used by dlext tests - with GNU RELRO program header 38# ----------------------------------------------------------------------------- 39libdlext_test_src_files := \ 40 dlext_test_library.cpp \ 41 42libdlext_test_ldflags := \ 43 -Wl,-z,relro \ 44 45libdlext_test_shared_libraries := libtest_simple 46 47module := libdlext_test 48module_tag := optional 49include $(LOCAL_PATH)/Android.build.testlib.mk 50 51# ----------------------------------------------------------------------------- 52# Library used by dlext tests - different name non-default location 53# ----------------------------------------------------------------------------- 54module := libdlext_test_fd 55 56libdlext_test_fd_src_files := \ 57 dlext_test_library.cpp \ 58 59libdlext_test_fd_shared_libraries := libtest_simple 60 61libdlext_test_fd_relative_install_path := $(module) 62 63libdlext_test_fd_ldflags := -Wl,--rpath,\$${ORIGIN}/.. -Wl,--enable-new-dtags 64 65module_tag := optional 66include $(LOCAL_PATH)/Android.build.testlib.target.mk 67 68 69# ----------------------------------------------------------------------------- 70# Libraries used by dlext tests for open from a zip-file 71# ----------------------------------------------------------------------------- 72module := libdlext_test_zip 73 74libdlext_test_zip_src_files := \ 75 dlext_test_library.cpp \ 76 77libdlext_test_zip_shared_libraries := libatest_simple_zip 78 79libdlext_test_zip_relative_install_path := $(module) 80module_tag := optional 81include $(LOCAL_PATH)/Android.build.testlib.target.mk 82 83module := libatest_simple_zip 84 85libatest_simple_zip_src_files := \ 86 dlopen_testlib_simple.cpp 87 88libatest_simple_zip_relative_install_path := $(module) 89module_tag := optional 90include $(LOCAL_PATH)/Android.build.testlib.target.mk 91 92# ---------------------------------------------------------------------------- 93# Library with soname which does not match filename 94# ---------------------------------------------------------------------------- 95libdlext_test_different_soname_src_files := \ 96 dlext_test_library.cpp \ 97 98module := libdlext_test_different_soname 99module_tag := optional 100libdlext_test_different_soname_ldflags := -Wl,-soname=libdlext_test_soname.so 101include $(LOCAL_PATH)/Android.build.testlib.mk 102 103# ----------------------------------------------------------------------------- 104# Library used by dlext tests - zipped and aligned 105# ----------------------------------------------------------------------------- 106include $(CLEAR_VARS) 107bionic_2nd_arch_prefix := 108include $(LOCAL_PATH)/Android.build.dlext_testzip.mk 109ifneq ($(TARGET_2ND_ARCH),) 110 bionic_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) 111 include $(LOCAL_PATH)/Android.build.dlext_testzip.mk 112endif 113 114# ----------------------------------------------------------------------------- 115# Build test helper libraries for linker namespaces 116# ----------------------------------------------------------------------------- 117include $(LOCAL_PATH)/Android.build.linker_namespaces.mk 118 119# ----------------------------------------------------------------------------- 120# Build DT_RUNPATH test helper libraries 121# ----------------------------------------------------------------------------- 122include $(LOCAL_PATH)/Android.build.dt_runpath.mk 123 124# ----------------------------------------------------------------------------- 125# Build library with two parents 126# ----------------------------------------------------------------------------- 127include $(LOCAL_PATH)/Android.build.dlopen_2_parents_reloc.mk 128 129# ----------------------------------------------------------------------------- 130# Build libtest_check_order_dlsym.so with its dependencies. 131# ----------------------------------------------------------------------------- 132include $(LOCAL_PATH)/Android.build.dlopen_check_order_dlsym.mk 133 134# ----------------------------------------------------------------------------- 135# Build libtest_check_order_siblings.so with its dependencies. 136# ----------------------------------------------------------------------------- 137include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_siblings.mk 138 139# ----------------------------------------------------------------------------- 140# Build libtest_check_order_root.so with its dependencies. 141# ----------------------------------------------------------------------------- 142include $(LOCAL_PATH)/Android.build.dlopen_check_order_reloc_main_executable.mk 143 144# ----------------------------------------------------------------------------- 145# Build libtest_versioned_lib.so with its dependencies. 146# ----------------------------------------------------------------------------- 147include $(LOCAL_PATH)/Android.build.versioned_lib.mk 148 149# ----------------------------------------------------------------------------- 150# Build libraries needed by pthread_atfork tests 151# ----------------------------------------------------------------------------- 152include $(LOCAL_PATH)/Android.build.pthread_atfork.mk 153 154# ----------------------------------------------------------------------------- 155# Library with dependency used by dlfcn tests 156# ----------------------------------------------------------------------------- 157libtest_with_dependency_src_files := \ 158 dlopen_testlib_simple.cpp 159 160libtest_with_dependency_shared_libraries := libdlext_test 161 162module := libtest_with_dependency 163include $(LOCAL_PATH)/Android.build.testlib.mk 164