1# 2# Copyright (C) 2014 The Android Open Source Project 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions 7# are met: 8# * Redistributions of source code must retain the above copyright 9# notice, this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in 12# the documentation and/or other materials provided with the 13# distribution. 14# 15# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 18# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 22# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26# SUCH DAMAGE. 27# 28# 29# Copyright (c) 2014 ARM Ltd 30# All rights reserved. 31# 32# Redistribution and use in source and binary forms, with or without 33# modification, are permitted provided that the following conditions 34# are met: 35# 1. Redistributions of source code must retain the above copyright 36# notice, this list of conditions and the following disclaimer. 37# 2. Redistributions in binary form must reproduce the above copyright 38# notice, this list of conditions and the following disclaimer in the 39# documentation and/or other materials provided with the distribution. 40# 3. The name of the company may not be used to endorse or promote 41# products derived from this software without specific prior written 42# permission. 43# 44# THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED 45# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 46# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 47# IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 48# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 49# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 50# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 51# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 52# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 53# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 54 55LOCAL_PATH:= $(call my-dir) 56 57vixl_include_files := $(LOCAL_PATH)/src/ \ 58 59vixl_src_files := \ 60 src/a64/assembler-a64.cc \ 61 src/a64/cpu-a64.cc \ 62 src/a64/debugger-a64.cc \ 63 src/a64/decoder-a64.cc \ 64 src/a64/disasm-a64.cc \ 65 src/a64/instructions-a64.cc \ 66 src/a64/instrument-a64.cc \ 67 src/a64/macro-assembler-a64.cc \ 68 src/a64/simulator-a64.cc \ 69 src/utils-vixl.cc 70 71vixl_test_files := \ 72 test/cctest.cc \ 73 test/test-utils-a64.cc \ 74 test/test-assembler-a64.cc \ 75 test/test-simulator-a64.cc \ 76 test/test-disasm-a64.cc \ 77 test/test-fuzz-a64.cc 78 79include $(CLEAR_VARS) 80LOCAL_CPP_EXTENSION := .cc 81LOCAL_CPPFLAGS := -O2 -Wall -Wextra -DUSE_SIMULATOR 82LOCAL_CPPFLAGS_arm64 := -UUSE_SIMULATOR 83LOCAL_C_INCLUDES := $(vixl_include_files) 84LOCAL_SRC_FILES := $(vixl_src_files) 85LOCAL_SHARED_LIBRARIES := liblog 86LOCAL_MODULE_TAGS := optional 87LOCAL_MODULE := libvixl 88LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 89include external/libcxx/libcxx.mk 90include $(BUILD_SHARED_LIBRARY) 91 92include $(CLEAR_VARS) 93LOCAL_CPP_EXTENSION := .cc 94LOCAL_CPPFLAGS := -O2 -Wall -Wextra -DDEBUG=1 -DUSE_SIMULATOR 95LOCAL_CPPFLAGS_arm64 := -UUSE_SIMULATOR 96LOCAL_C_INCLUDES := $(vixl_include_files) 97LOCAL_SRC_FILES := $(vixl_src_files) 98LOCAL_SHARED_LIBRARIES := liblog 99LOCAL_MODULE_TAGS := optional 100LOCAL_MODULE := libvixlg 101LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 102include external/libcxx/libcxx.mk 103include $(BUILD_SHARED_LIBRARY) 104 105include $(CLEAR_VARS) 106LOCAL_CLANG := true 107LOCAL_CPP_EXTENSION := .cc 108LOCAL_CPPFLAGS := -O2 -Wall -Wextra -DUSE_SIMULATOR 109LOCAL_C_INCLUDES := $(vixl_include_files) 110LOCAL_SRC_FILES := $(vixl_src_files) 111LOCAL_STATIC_LIBRARIES := liblog 112LOCAL_MODULE_TAGS := optional 113LOCAL_MODULE := libvixl 114LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 115LOCAL_MULTILIB := both 116include external/libcxx/libcxx.mk 117include $(BUILD_HOST_STATIC_LIBRARY) 118 119# cctest_vixl: VIXL native tests (to run all tests execute ./cctest_vixl --run_all) 120# 121# We only support 64bit host builds of cctest. 122include $(CLEAR_VARS) 123LOCAL_CLANG := true 124LOCAL_CPP_EXTENSION := .cc 125LOCAL_CPPFLAGS := -O2 -Wall -Wextra -DUSE_SIMULATOR -DDEBUG=1 -UNDEBUG 126LOCAL_C_INCLUDES := $(vixl_include_files) 127LOCAL_SRC_FILES := $(vixl_test_files) $(vixl_src_files) 128LOCAL_MODULE_TAGS := optional 129LOCAL_MODULE_HOST_ARCH := x86_64 130LOCAL_FORCE_STATIC_EXECUTABLE := true 131LOCAL_MODULE := cctest_vixl 132LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 133include external/libcxx/libcxx.mk 134include $(BUILD_HOST_EXECUTABLE) 135 136.PHONY: run-vixl-tests 137run-vixl-tests: cctest_vixl 138 $(HOST_OUT)/bin/cctest_vixl --run_all 139 @echo vixl tests PASSED 140