1# 2# Copyright 2019, 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(GPIOMUXServer C) 16 17CAmkESAddImportPath(camkes-include) 18CAmkESAddCPPInclude(camkes-include) 19CAmkESAddTemplatesPath(templates) 20 21DeclareCAmkESConnector( 22 GPIOServerInit 23 FROM 24 GPIOServer.template.c 25 FROM_LIBS 26 GPIOServer-server 27 TO 28 empty.c 29) 30 31DeclareCAmkESConnector( 32 GPIOServerClientInit 33 FROM 34 GPIOServer-client.template.c 35 FROM_LIBS 36 GPIOMUXServer-client 37 TO 38 empty.c 39) 40 41DeclareCAmkESConnector( 42 MUXServerInit 43 FROM 44 MUXServer.template.c 45 FROM_LIBS 46 MUXServer-server 47 TO 48 empty.c 49) 50 51DeclareCAmkESConnector( 52 MUXServerClientInit 53 FROM 54 MUXServer-client.template.c 55 FROM_LIBS 56 GPIOMUXServer-client 57 TO 58 empty.c 59) 60 61if("${KernelPlatform}" STREQUAL "tx2") 62 DeclareCAmkESComponent(GPIOMUXServer LIBS platsupportports) 63endif() 64 65CAmkESAddCPPInclude("${CMAKE_CURRENT_LIST_DIR}/include/plat/${KernelPlatform}/") 66 67add_subdirectory( 68 "${CMAKE_CURRENT_LIST_DIR}/libGPIOMUXServer-client" 69 ${CMAKE_CURRENT_BINARY_DIR}/libGPIOMUXServer-client 70) 71 72add_library(GPIOServer-server EXCLUDE_FROM_ALL src/gpio.c) 73target_link_libraries(GPIOServer-server sel4camkes GPIOMUXServer-client) 74 75add_library(MUXServer-server EXCLUDE_FROM_ALL src/mux.c) 76target_link_libraries(MUXServer-server sel4camkes) 77