2 # Copyright (C) 2015 The Android Open Source Project
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 common_cppflags
:= -Wall
-Wextra
-Wunused
-Werror
-Wold-style-cast
19 LOCAL_PATH
:= $(call my-dir
)
23 LOCAL_CPP_EXTENSION
:= .
cc
27 src
/delta_encoder.
cc \
33 LOCAL_STATIC_LIBRARIES
:= libelf
34 LOCAL_C_INCLUDES
:= external
/elfutils
/src
/libelf
35 LOCAL_MODULE
:= lib_relocation_packer
37 LOCAL_CPPFLAGS
:= $(common_cppflags
)
39 LOCAL_ADDITIONAL_DEPENDENCIES
:= $(LOCAL_PATH
)/Android.mk
41 include $(BUILD_HOST_STATIC_LIBRARY
)
45 LOCAL_CPP_EXTENSION
:= .
cc
47 LOCAL_SRC_FILES
:= src
/main.
cc
48 LOCAL_STATIC_LIBRARIES
:= lib_relocation_packer libelf
49 LOCAL_C_INCLUDES
:= external
/elfutils
/src
/libelf libnativehelper
/include
51 LOCAL_MODULE
:= relocation_packer
53 LOCAL_CPPFLAGS
:= $(common_cppflags
)
55 LOCAL_ADDITIONAL_DEPENDENCIES
:= $(LOCAL_PATH
)/Android.mk
57 include $(BUILD_HOST_EXECUTABLE
)
61 LOCAL_CPP_EXTENSION
:= .
cc
64 src
/debug_unittest.
cc \
65 src
/delta_encoder_unittest.
cc \
66 src
/elf_file_unittest.
cc \
67 src
/leb128_unittest.
cc \
68 src
/sleb128_unittest.
cc \
69 src
/packer_unittest.
cc \
71 LOCAL_STATIC_LIBRARIES
:= lib_relocation_packer libelf
72 LOCAL_C_INCLUDES
:= external
/elfutils
/src
/libelf
74 LOCAL_CPPFLAGS
:= $(common_cppflags
)
76 LOCAL_MODULE
:= relocation_packer_unit_tests
77 LOCAL_ADDITIONAL_DEPENDENCIES
:= $(LOCAL_PATH
)/Android.mk
79 include $(BUILD_HOST_NATIVE_TEST
)
82 define copy-test-library
84 LOCAL_IS_HOST_MODULE
:= true
86 LOCAL_MODULE_CLASS
:= SHARED_LIBRARIES
87 LOCAL_MODULE_PATH
:= $(HOST_OUT_EXECUTABLES
)
88 LOCAL_STRIP_MODULE
:= false
89 LOCAL_SRC_FILES
:= test_data
/$(1)
90 include $(BUILD_PREBUILT
)
93 $(eval
$(call copy-test-library
,elf_file_unittest_relocs_arm32.so
))
94 $(eval
$(call copy-test-library
,elf_file_unittest_relocs_arm32_packed.so
))
95 $(eval
$(call copy-test-library
,elf_file_unittest_relocs_arm64.so
))
96 $(eval
$(call copy-test-library
,elf_file_unittest_relocs_arm64_packed.so
))