Android.mk revision 1f5e1a3cbc564c593fe1090894ecdb070f36e20c
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
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# -----------------------------------------------------------------------------
81# Library used by dlfcn tests
82# -----------------------------------------------------------------------------
83libtest_simple_src_files := \
84    dlopen_testlib_simple.cpp
85
86module := libtest_simple
87build_type := target
88build_target := SHARED_LIBRARY
89include $(TEST_PATH)/Android.build.mk
90
91
92# -----------------------------------------------------------------------------
93# Library used by atexit tests
94# -----------------------------------------------------------------------------
95
96libtest_atexit_src_files := \
97    atexit_testlib.cpp
98
99module := libtest_atexit
100build_target := SHARED_LIBRARY
101build_type := target
102include $(TEST_PATH)/Android.build.mk
103build_type := host
104include $(TEST_PATH)/Android.build.mk
105
106