1# 2# Copyright (c) 2018, Google, Inc. All rights reserved 3# 4# Permission is hereby granted, free of charge, to any person obtaining 5# a copy of this software and associated documentation files 6# (the "Software"), to deal in the Software without restriction, 7# including without limitation the rights to use, copy, modify, merge, 8# publish, distribute, sublicense, and/or sell copies of the Software, 9# and to permit persons to whom the Software is furnished to do so, 10# subject to the following conditions: 11# 12# The above copyright notice and this permission notice shall be 13# included in all copies or substantial portions of the Software. 14# 15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 16# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 19# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 21# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22# 23 24LOCAL_DIR := $(GET_LOCAL_DIR) 25 26MODULE := $(LOCAL_DIR) 27 28# Override default build directory 29TRUSTY_APP_BUILDDIR := $(BUILDDIR)/test-runner 30 31# test-runner does not run in trusty, to enable CFI it depends on 32# trusty modules so anything that needs runtime support is probably 33# not worth the effort 34MODULE_DISABLE_CFI := true 35 36# SCS requires us to allocate a guard region from the heap so it is 37# probably not worth the effort for the same reasons that CFI isn't 38MODULE_DISABLE_SCS := true 39 40QL_TIPC = $(LOCAL_DIR)/../ql-tipc 41 42MODULE_DEFINES += \ 43 NS_ARCH_ARM64=1 \ 44 45MODULE_INCLUDES += \ 46 $(LOCAL_DIR)/include \ 47 $(LOCAL_DIR)/$(ARCH)/include \ 48 $(QL_TIPC)/include \ 49 $(LOCAL_DIR)/../interface/include \ 50 $(LKROOT)/include \ 51 $(LKROOT)/include/shared/lk \ 52 $(LKROOT)/lib/libc/include \ 53 54MODULE_SRCS += \ 55 $(LOCAL_DIR)/test-runner.c \ 56 $(LOCAL_DIR)/test-runner-storage.c \ 57 $(LOCAL_DIR)/test-runner-sysdeps.c \ 58 $(LOCAL_DIR)/test-runner-comm-port.c \ 59 $(LOCAL_DIR)/virtio.c \ 60 $(LOCAL_DIR)/virtio-console.c \ 61 $(QL_TIPC)/hwbcc.c \ 62 $(QL_TIPC)/ipc.c \ 63 $(QL_TIPC)/ipc_dev.c \ 64 $(QL_TIPC)/keymaster.c \ 65 $(QL_TIPC)/keymaster_serializable.c \ 66 $(QL_TIPC)/rpmb_proxy.c \ 67 $(QL_TIPC)/secretkeeper.c \ 68 $(QL_TIPC)/trusty_dev_common.c \ 69 $(QL_TIPC)/util.c \ 70 71ifeq (true,$(call TOBOOL,$(VIRTIO_MMIO_DEVICE))) 72MODULE_SRCS += $(LOCAL_DIR)/virtio-mmio.c 73else 74MODULE_SRCS += $(LOCAL_DIR)/virtio-pci.c 75endif 76 77# Do not include implicit dependencies 78MODULE_ADD_IMPLICIT_DEPS := false 79 80MODULE_COMPILEFLAGS += -fno-builtin 81 82include $(LOCAL_DIR)/$(ARCH)/rules.mk 83include make/trusted_app.mk 84