blob: dc38ae5d0d724ef90a5966d5e85c04bdac4e8e04 [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
Dmitriy Ivanov4571f312014-08-15 14:22:07 -070020common_cppflags += -std=gnu++11
Dmitriy Ivanov1f5e1a32014-06-02 16:29:00 -070021# -----------------------------------------------------------------------------
22# Library used by dlfcn tests.
23# -----------------------------------------------------------------------------
24ifneq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
25no-elf-hash-table-library_src_files := \
26 empty.cpp \
27
28no-elf-hash-table-library_ldflags := \
29 -Wl,--hash-style=gnu \
30
31module := no-elf-hash-table-library
32module_tag := optional
33build_type := target
34build_target := SHARED_LIBRARY
35include $(TEST_PATH)/Android.build.mk
36endif
37
38# -----------------------------------------------------------------------------
39# Library used by dlext tests - with GNU RELRO program header
40# -----------------------------------------------------------------------------
41libdlext_test_src_files := \
42 dlext_test_library.cpp \
43
44libdlext_test_ldflags := \
45 -Wl,-z,relro \
46
47module := libdlext_test
48module_tag := optional
49build_type := target
50build_target := SHARED_LIBRARY
51include $(TEST_PATH)/Android.build.mk
52
53# -----------------------------------------------------------------------------
54# create symlink to libdlext_test.so for symlink test
55# -----------------------------------------------------------------------------
56# Use = instead of := to defer the evaluation of $@
57$(LOCAL_INSTALLED_MODULE): PRIVATE_POST_INSTALL_CMD = \
58 $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
59
60ifneq ($(TARGET_2ND_ARCH),)
61# link 64 bit .so
62$(TARGET_OUT)/lib64/libdlext_test.so: PRIVATE_POST_INSTALL_CMD = \
63 $(hide) cd $(dir $@) && ln -sf $(notdir $@) libdlext_test_v2.so
64endif
65
66# -----------------------------------------------------------------------------
67# Library used by dlext tests - without GNU RELRO program header
68# -----------------------------------------------------------------------------
69libdlext_test_norelro_src_files := \
70 dlext_test_library.cpp \
71
72libdlext_test_norelro_ldflags := \
73 -Wl,-z,norelro \
74
75module := libdlext_test_norelro
76module_tag := optional
77build_type := target
78build_target := SHARED_LIBRARY
79include $(TEST_PATH)/Android.build.mk
80
81# -----------------------------------------------------------------------------
Dmitriy Ivanov04dc91a2014-07-01 14:10:16 -070082# Library used by dlext tests - different name non-default location
83# -----------------------------------------------------------------------------
84libdlext_test_fd_src_files := \
85 dlext_test_library.cpp \
86
87libdlext_test_fd_install_to_out_data := true
88module := libdlext_test_fd
89module_tag := optional
90build_type := target
91build_target := SHARED_LIBRARY
92include $(TEST_PATH)/Android.build.mk
93
94# -----------------------------------------------------------------------------
Dmitriy Ivanov1f5e1a32014-06-02 16:29:00 -070095# Library used by dlfcn tests
96# -----------------------------------------------------------------------------
97libtest_simple_src_files := \
98 dlopen_testlib_simple.cpp
99
100module := libtest_simple
101build_type := target
102build_target := SHARED_LIBRARY
103include $(TEST_PATH)/Android.build.mk
104
Dmitriy Ivanovd97e9f52014-06-29 12:28:37 -0700105# -----------------------------------------------------------------------------
Dmitriy Ivanovb2a30ee2014-09-04 18:23:00 -0700106# libtest_relo_check_dt_needed_order.so
107# |
108# +-> libtest_relo_check_dt_needed_order_1.so
109# |
110# +-> libtest_relo_check_dt_needed_order_2.so
111# -----------------------------------------------------------------------------
112libtest_relo_check_dt_needed_order_shared_libraries := \
113 libtest_relo_check_dt_needed_order_1 libtest_relo_check_dt_needed_order_2
114
115libtest_relo_check_dt_needed_order_src_files := dlopen_testlib_relo_check_dt_needed_order.cpp
116libtest_relo_check_dt_needed_order_1_src_files := dlopen_testlib_relo_check_dt_needed_order_1.cpp
117libtest_relo_check_dt_needed_order_2_src_files := dlopen_testlib_relo_check_dt_needed_order_2.cpp
118build_type := target
119build_target := SHARED_LIBRARY
120
121module := libtest_relo_check_dt_needed_order
122include $(TEST_PATH)/Android.build.mk
123module := libtest_relo_check_dt_needed_order_1
124include $(TEST_PATH)/Android.build.mk
125module := libtest_relo_check_dt_needed_order_2
126include $(TEST_PATH)/Android.build.mk
127
128# -----------------------------------------------------------------------------
Dmitriy Ivanovaa0f2bd2014-07-28 17:32:20 -0700129# Library with dependency used by dlfcn tests
130# -----------------------------------------------------------------------------
131libtest_with_dependency_src_files := \
132 dlopen_testlib_simple.cpp
133
134libtest_with_dependency_shared_libraries := libdlext_test
135
136module := libtest_with_dependency
137build_type := target
138build_target := SHARED_LIBRARY
139include $(TEST_PATH)/Android.build.mk
140
141# -----------------------------------------------------------------------------
Brigid Smithc5a13ef2014-07-23 11:22:25 -0700142# Library used by ifunc tests
143# -----------------------------------------------------------------------------
144ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64))
145 libtest_ifunc_src_files := \
146 dlopen_testlib_ifunc.c
147
148 LOCAL_SDK_VERSION := current
149 module := libtest_ifunc
150 build_type := target
151 build_target := SHARED_LIBRARY
152 include $(TEST_PATH)/Android.build.mk
153endif
154
155# -----------------------------------------------------------------------------
Dmitriy Ivanov1f5e1a32014-06-02 16:29:00 -0700156# Library used by atexit tests
157# -----------------------------------------------------------------------------
158
159libtest_atexit_src_files := \
160 atexit_testlib.cpp
161
162module := libtest_atexit
163build_target := SHARED_LIBRARY
164build_type := target
165include $(TEST_PATH)/Android.build.mk
166build_type := host
167include $(TEST_PATH)/Android.build.mk
168
Dmitriy Ivanovce441662014-06-17 15:56:38 -0700169# -----------------------------------------------------------------------------
170# Library with weak function
171# -----------------------------------------------------------------------------
172libtest_dlsym_weak_func_src_files := \
173 dlsym_weak_function.cpp
174
175module := libtest_dlsym_weak_func
176build_target := SHARED_LIBRARY
177build_type := target
178include $(TEST_PATH)/Android.build.mk
179build_type := host
180include $(TEST_PATH)/Android.build.mk