blob: 3c7dc225dbc232396ec4b0d5edd5e070de634cd3 [file] [log] [blame]
Miguel Young de la Sotac4d8c972019-12-04 14:31:04 -06001# Copyright lowRISC contributors.
2# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3# SPDX-License-Identifier: Apache-2.0
4
Miguel Young de la Sotafa12ce02019-11-26 14:53:55 -06005subdir('freestanding')
6
Silvestrs Timofejevs43796962020-03-25 10:14:55 +00007# Non volatile bit manipulation helper library (sw_lib_bitfield).
8sw_lib_bitfield = declare_dependency(
9 link_with: static_library(
10 'bitfield_ot',
11 sources: ['bitfield.c'],
12 )
13)
14
Miguel Young de la Sotac4d8c972019-12-04 14:31:04 -060015# Memory Operations library (sw_lib_mem)
16sw_lib_mem = declare_dependency(
17 link_with: static_library(
18 'mem_ot',
19 sources: ['memory.c'],
20 c_args: ['-fno-builtin'],
21 )
Miguel Young de la Sota78e80042019-12-10 17:24:03 +000022)
23
24# MMIO register manipulation library
25sw_lib_mmio = declare_dependency(
26 link_with: static_library(
27 'mmio_ot',
28 sources: ['mmio.c'],
Silvestrs Timofejevs09e0f1d2020-04-03 08:54:52 +010029 dependencies: [sw_lib_bitfield],
Miguel Young de la Sota78e80042019-12-10 17:24:03 +000030 )
31)
Miguel Young de la Sota30eb41a2019-12-12 15:25:50 -060032
33# Basic printing library (sw_lib_base_print)
34sw_lib_base_print = declare_dependency(
35 link_with: static_library(
36 'base_print_ot',
37 sources: ['print.c'],
38 )
39)
40
Miguel Young de la Sota10fe7e52020-02-25 17:00:12 -050041# Generic logging library (sw_lib_base_log)
42sw_lib_base_log = declare_dependency(
43 link_with: static_library(
44 'base_log_ot',
45 sources: ['log.c'],
46 dependencies: [
47 sw_lib_base_print,
48 ],
49 )
50)
51
Miguel Young de la Sota30eb41a2019-12-12 15:25:50 -060052test('sw_lib_base_print_test', executable(
53 'sw_lib_base_print_test',
54 sources: ['print.c', 'print_test.cc'],
55 dependencies: [
56 sw_vendor_gtest,
57 ],
58 native: true,
59))
60