1# 2# Copyright 2017, Data61 3# Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4# ABN 41 687 119 230. 5# 6# This software may be distributed and modified according to the terms of 7# the BSD 2-Clause license. Note that NO WARRANTY is provided. 8# See "LICENSE_BSD2.txt" for details. 9# 10# @TAG(DATA61_BSD) 11# 12 13cmake_minimum_required(VERSION 3.7.2) 14 15project(libsel4utils C) 16 17set(configure_string "") 18 19config_string( 20 LibSel4UtilsStackSize 21 SEL4UTILS_STACK_SIZE 22 "Size of stacks in bytes to allocate if using vspace interface in this library" 23 DEFAULT 24 65536 25 UNQUOTE 26) 27config_string( 28 LibSel4UtilsCSpaceSizeBits 29 SEL4UTILS_CSPACE_SIZE_BITS 30 "Size of default cspace to spawn processes with" 31 DEFAULT 32 12 33 UNQUOTE 34) 35config_option(LibSel4UtilsProfile SEL4UTILS_PROFILE "Profiling tools \ 36 Enables the functionality of a set of profiling tools. When disabled these profiling tools \ 37 will compile down to nothing." DEFAULT OFF) 38mark_as_advanced(LibSel4UtilsStackSize LibSel4UtilsCSpaceSizeBits LibSel4UtilsProfile) 39add_config_library(sel4utils "${configure_string}") 40 41file( 42 GLOB 43 deps 44 src/*.c 45 src/vspace/*.c 46 src/irq_server/*.c 47 src/serial_server/*.c 48 src/time_server/*.c 49 src/sel4_arch/${KernelSel4Arch}/*.c 50 src/arch/${KernelArch}/*.c 51) 52 53list(SORT deps) 54 55add_library(sel4utils STATIC EXCLUDE_FROM_ALL ${deps}) 56target_include_directories( 57 sel4utils 58 PUBLIC include "sel4_arch_include/${KernelSel4Arch}" "arch_include/${KernelArch}" 59) 60target_link_libraries( 61 sel4utils 62 muslc 63 sel4 64 sel4runtime 65 sel4vspace 66 sel4simple 67 sel4platsupport 68 elf 69 cpio 70 sel4utils_Config 71 sel4_autoconf 72) 73