2014-10-04 02:52:44 +02:00
|
|
|
#
|
|
|
|
# Copyright (C) 2014 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Library used by dlext tests - zipped and aligned
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
2016-01-20 05:32:37 +01:00
|
|
|
BIONIC_TESTS_ZIPALIGN := $(HOST_OUT_EXECUTABLES)/bionic_tests_zipalign
|
|
|
|
|
2014-10-09 01:22:03 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
2015-09-29 01:38:31 +02:00
|
|
|
LOCAL_MODULE := libdlext_test_zip_zipaligned
|
2014-10-09 01:22:03 +02:00
|
|
|
LOCAL_MODULE_SUFFIX := .zip
|
|
|
|
LOCAL_MODULE_TAGS := tests
|
2015-09-29 01:38:31 +02:00
|
|
|
LOCAL_MODULE_PATH := $($(bionic_2nd_arch_prefix)TARGET_OUT_DATA_NATIVE_TESTS)/libdlext_test_zip
|
2014-10-09 01:22:03 +02:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(bionic_2nd_arch_prefix)
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
|
|
|
|
my_shared_libs := \
|
2015-09-29 01:38:31 +02:00
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libdlext_test_zip.so \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libatest_simple_zip.so
|
2014-10-09 01:22:03 +02:00
|
|
|
|
2016-01-20 05:32:37 +01:00
|
|
|
$(LOCAL_BUILT_MODULE) : $(my_shared_libs) | $(BIONIC_TESTS_ZIPALIGN)
|
|
|
|
@echo "Aligning zip: $@"
|
2015-01-16 14:22:54 +01:00
|
|
|
$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)/libdir
|
|
|
|
$(hide) cp $^ $(dir $@)/libdir
|
2015-09-29 00:56:18 +02:00
|
|
|
$(hide) (cd $(dir $@) && touch empty_file.txt && zip -qrD0 $(notdir $@).unaligned empty_file.txt libdir/*.so)
|
2016-01-20 05:32:37 +01:00
|
|
|
$(hide) $(BIONIC_TESTS_ZIPALIGN) 4096 $@.unaligned $@
|
2015-10-02 03:41:57 +02:00
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
|
|
|
LOCAL_MODULE := libdlext_test_runpath_zip_zipaligned
|
|
|
|
LOCAL_MODULE_SUFFIX := .zip
|
|
|
|
LOCAL_MODULE_TAGS := tests
|
|
|
|
LOCAL_MODULE_PATH := $($(bionic_2nd_arch_prefix)TARGET_OUT_DATA_NATIVE_TESTS)/libdlext_test_runpath_zip
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(bionic_2nd_arch_prefix)
|
|
|
|
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
my_shared_libs := \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_d_zip.so \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_b.so \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_a.so \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_c.so \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_x.so
|
|
|
|
|
|
|
|
|
|
|
|
$(LOCAL_BUILT_MODULE) : PRIVATE_LIB_D := \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_d_zip.so
|
|
|
|
$(LOCAL_BUILT_MODULE) : PRIVATE_LIB_A := \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_a.so
|
|
|
|
$(LOCAL_BUILT_MODULE) : PRIVATE_LIB_B := \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_b.so
|
|
|
|
$(LOCAL_BUILT_MODULE) : PRIVATE_LIB_C := \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_c.so
|
|
|
|
$(LOCAL_BUILT_MODULE) : PRIVATE_LIB_X := \
|
|
|
|
$($(bionic_2nd_arch_prefix)TARGET_OUT_INTERMEDIATE_LIBRARIES)/libtest_dt_runpath_x.so
|
2016-01-20 05:32:37 +01:00
|
|
|
$(LOCAL_BUILT_MODULE) : $(my_shared_libs) | $(BIONIC_TESTS_ZIPALIGN)
|
|
|
|
@echo "Aligning zip: $@"
|
2015-10-02 03:41:57 +02:00
|
|
|
$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)/libdir && \
|
|
|
|
mkdir -p $(dir $@)/libdir/dt_runpath_a && mkdir -p $(dir $@)/libdir/dt_runpath_b_c_x
|
|
|
|
$(hide) cp $(PRIVATE_LIB_D) $(dir $@)/libdir
|
|
|
|
$(hide) cp $(PRIVATE_LIB_A) $(dir $@)/libdir/dt_runpath_a
|
|
|
|
$(hide) cp $(PRIVATE_LIB_B) $(dir $@)/libdir/dt_runpath_b_c_x
|
|
|
|
$(hide) cp $(PRIVATE_LIB_C) $(dir $@)/libdir/dt_runpath_b_c_x
|
|
|
|
$(hide) cp $(PRIVATE_LIB_X) $(dir $@)/libdir/dt_runpath_b_c_x
|
|
|
|
$(hide) (cd $(dir $@) && touch empty_file.txt && zip -qrD0 $(notdir $@).unaligned empty_file.txt libdir)
|
2016-01-20 05:32:37 +01:00
|
|
|
$(hide) $(BIONIC_TESTS_ZIPALIGN) 4096 $@.unaligned $@
|
2015-10-02 03:41:57 +02:00
|
|
|
|