1#
2# Copyright 2018, 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.8.2)
14
15project(SerialServer C)
16
17if(KernelArchARM)
18    set(CAmkESDTS ON CACHE BOOL "" FORCE)
19endif()
20
21set(CAmkESCPP ON CACHE BOOL "" FORCE)
22
23# ARM platforms have similar serial configurations in their DTSes and can share
24# similar headers and code
25if(KernelArchARM)
26    set(PlatPrefix "arm_common")
27else()
28    set(PlatPrefix "${KernelPlatform}")
29endif()
30
31DeclareCAmkESComponent(
32    SerialServer
33    SOURCES
34    src/serial.c
35    src/plat.c
36    src/server_virtqueue.c
37    src/plat/${PlatPrefix}/plat.c
38    LIBS
39    virtqueue
40    vswitch
41)
42
43CAmkESAddCPPInclude("${CMAKE_CURRENT_LIST_DIR}/include/plat/${PlatPrefix}/")
44
45add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/camkes-putchar-client camkes-putchar-client)
46