blob: 20bc263b08ccc6301de58ec455921e63875c953f [file] [log] [blame]
Dmitriy Ivanov1f5e1a32014-06-02 16:29:00 -07001#
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
20# -----------------------------------------------------------------------------
21# Library used by dlfcn tests.
22# -----------------------------------------------------------------------------
23ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
24no-elf-hash-table-library_src_files := \
25 empty.cpp \
26
27no-elf-hash-table-library_ldflags := \
28 -Wl,--hash-style=gnu \
29
30module := no-elf-hash-table-library
31module_tag := optional
32build_type := target
33build_target := SHARED_LIBRARY
34include $(TEST_PATH)/Android.build.mk
35endif
36
37# -----------------------------------------------------------------------------
38# Library used by dlext tests - with GNU RELRO program header
39# -----------------------------------------------------------------------------
40libdlext_test_src_files := \
41 dlext_test_library.cpp \
42
43libdlext_test_ldflags := \
44 -Wl,-z,relro \
45
46module := libdlext_test
47module_tag := optional
48build_type := target
49build_target := SHARED_LIBRARY
50include $(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
59ifneq ($(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
63endif
64
65# -----------------------------------------------------------------------------
66# Library used by dlext tests - without GNU RELRO program header
67# -----------------------------------------------------------------------------
68libdlext_test_norelro_src_files := \
69 dlext_test_library.cpp \
70
71libdlext_test_norelro_ldflags := \
72 -Wl,-z,norelro \
73
74module := libdlext_test_norelro
75module_tag := optional
76build_type := target
77build_target := SHARED_LIBRARY
78include $(TEST_PATH)/Android.build.mk
79
80# -----------------------------------------------------------------------------
Dmitriy Ivanov04dc91a2014-07-01 14:10:16 -070081# Library used by dlext tests - different name non-default location
82# -----------------------------------------------------------------------------
83libdlext_test_fd_src_files := \
84 dlext_test_library.cpp \
85
86libdlext_test_fd_install_to_out_data := true
87module := libdlext_test_fd
88module_tag := optional
89build_type := target
90build_target := SHARED_LIBRARY
91include $(TEST_PATH)/Android.build.mk
92
93# -----------------------------------------------------------------------------
Dmitriy Ivanov1f5e1a32014-06-02 16:29:00 -070094# Library used by dlfcn tests
95# -----------------------------------------------------------------------------
96libtest_simple_src_files := \
97 dlopen_testlib_simple.cpp
98
99module := libtest_simple
100build_type := target
101build_target := SHARED_LIBRARY
102include $(TEST_PATH)/Android.build.mk
103
Dmitriy Ivanovd97e9f52014-06-29 12:28:37 -0700104# -----------------------------------------------------------------------------
Dmitriy Ivanov8de1dde2014-09-04 18:23:00 -0700105# libtest_relo_check_dt_needed_order.so
106# |
107# +-> libtest_relo_check_dt_needed_order_1.so
108# |
109# +-> libtest_relo_check_dt_needed_order_2.so
110# -----------------------------------------------------------------------------
111libtest_relo_check_dt_needed_order_shared_libraries := \
112 libtest_relo_check_dt_needed_order_1 libtest_relo_check_dt_needed_order_2
113
114libtest_relo_check_dt_needed_order_src_files := dlopen_testlib_relo_check_dt_needed_order.cpp
115libtest_relo_check_dt_needed_order_1_src_files := dlopen_testlib_relo_check_dt_needed_order_1.cpp
116libtest_relo_check_dt_needed_order_2_src_files := dlopen_testlib_relo_check_dt_needed_order_2.cpp
117build_type := target
118build_target := SHARED_LIBRARY
119
120module := libtest_relo_check_dt_needed_order
121include $(TEST_PATH)/Android.build.mk
122module := libtest_relo_check_dt_needed_order_1
123include $(TEST_PATH)/Android.build.mk
124module := libtest_relo_check_dt_needed_order_2
125include $(TEST_PATH)/Android.build.mk
126
127# -----------------------------------------------------------------------------
Dmitriy Ivanovdb7a17d2014-08-04 23:39:22 +0000128# Library with dependency used by dlfcn tests
129# -----------------------------------------------------------------------------
130libtest_with_dependency_src_files := \
131 dlopen_testlib_simple.cpp
132
133libtest_with_dependency_shared_libraries := libdlext_test
134
135module := libtest_with_dependency
136build_type := target
137build_target := SHARED_LIBRARY
138include $(TEST_PATH)/Android.build.mk
139
140# -----------------------------------------------------------------------------
Brigid Smith31b88da2014-07-23 11:22:25 -0700141# Library used by ifunc tests
142# -----------------------------------------------------------------------------
143ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
144 libtest_ifunc_src_files := \
145 dlopen_testlib_ifunc.c
146
147 LOCAL_SDK_VERSION := current
148 module := libtest_ifunc
149 build_type := target
150 build_target := SHARED_LIBRARY
151 include $(TEST_PATH)/Android.build.mk
152endif
153
154# -----------------------------------------------------------------------------
Dmitriy Ivanov1f5e1a32014-06-02 16:29:00 -0700155# Library used by atexit tests
156# -----------------------------------------------------------------------------
157
158libtest_atexit_src_files := \
159 atexit_testlib.cpp
160
161module := libtest_atexit
162build_target := SHARED_LIBRARY
163build_type := target
164include $(TEST_PATH)/Android.build.mk
165build_type := host
166include $(TEST_PATH)/Android.build.mk
167
Dmitriy Ivanovce441662014-06-17 15:56:38 -0700168# -----------------------------------------------------------------------------
169# Library with weak function
170# -----------------------------------------------------------------------------
171libtest_dlsym_weak_func_src_files := \
172 dlsym_weak_function.cpp
173
174module := libtest_dlsym_weak_func
175build_target := SHARED_LIBRARY
176build_type := target
177include $(TEST_PATH)/Android.build.mk
178build_type := host
179include $(TEST_PATH)/Android.build.mk