Skip to content

Commit

Permalink
libsel4utils: specify source file explicitly
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Nov 20, 2023
1 parent ba9a084 commit 3218f3d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
32 changes: 23 additions & 9 deletions libsel4bench/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,32 @@ foreach(cfg_var IN LISTS CHECK_CFG_VARS)
message("${PROJECT_NAME} ${cfg_var}: ${${cfg_var}}")
endforeach()

file(
GLOB
deps
src/*.c
src/arch/${KernelArch}/*.c
src/arch/${KernelArch}/armv/${KernelArmArmV}/*.c
src/arch/${KernelArch}/cpu/${KernelArmCPU}/*.c
add_library(sel4bench EXCLUDE_FROM_ALL)

target_sources(
sel4bench
PRIVATE
src/event_counters.c
src/kernel_logging.c
src/logging.c
src/arch/${KernelArch}/event_counters.c
)

list(SORT deps)
if(KernelArchX86)
# empty
elseif(KernelArchARM)
target_sources(
sel4bench
PRIVATE
src/arch/${KernelArch}/armv/${KernelArmArmV}/event_counters.c
src/arch/${KernelArch}/cpu/${KernelArmCPU}/event_counters.c
)
elseif(KernelArchRiscV)
# empty
else()
message(FATAL_ERROR "Unsupported KernelArch '${KernelArch}'")
endif()

add_library(sel4bench EXCLUDE_FROM_ALL ${deps})
target_include_directories(
sel4bench
PUBLIC
Expand Down
16 changes: 16 additions & 0 deletions libsel4bench/src/arch/riscv/event_counters.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright 2017, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: BSD-2-Clause
*/

#include <sel4bench/sel4bench.h>
#include <utils/util.h>

#include "../../event_counters.h"

const char *sel4bench_arch_get_counter_description(counter_t counter)
{
ZF_LOGE("Not implemented");
return NULL;
}

0 comments on commit 3218f3d

Please sign in to comment.