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