Miguel Young de la Sota | c4d8c97 | 2019-12-04 14:31:04 -0600 | [diff] [blame] | 1 | # 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 Sota | fa12ce0 | 2019-11-26 14:53:55 -0600 | [diff] [blame] | 5 | subdir('freestanding') |
| 6 | |
Silvestrs Timofejevs | 4379696 | 2020-03-25 10:14:55 +0000 | [diff] [blame] | 7 | # Non volatile bit manipulation helper library (sw_lib_bitfield). |
| 8 | sw_lib_bitfield = declare_dependency( |
| 9 | link_with: static_library( |
| 10 | 'bitfield_ot', |
| 11 | sources: ['bitfield.c'], |
| 12 | ) |
| 13 | ) |
| 14 | |
Miguel Young de la Sota | c4d8c97 | 2019-12-04 14:31:04 -0600 | [diff] [blame] | 15 | # Memory Operations library (sw_lib_mem) |
| 16 | sw_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 Sota | 78e8004 | 2019-12-10 17:24:03 +0000 | [diff] [blame] | 22 | ) |
| 23 | |
| 24 | # MMIO register manipulation library |
| 25 | sw_lib_mmio = declare_dependency( |
| 26 | link_with: static_library( |
| 27 | 'mmio_ot', |
| 28 | sources: ['mmio.c'], |
Silvestrs Timofejevs | 09e0f1d | 2020-04-03 08:54:52 +0100 | [diff] [blame] | 29 | dependencies: [sw_lib_bitfield], |
Miguel Young de la Sota | 78e8004 | 2019-12-10 17:24:03 +0000 | [diff] [blame] | 30 | ) |
| 31 | ) |
Miguel Young de la Sota | 30eb41a | 2019-12-12 15:25:50 -0600 | [diff] [blame] | 32 | |
| 33 | # Basic printing library (sw_lib_base_print) |
| 34 | sw_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 Sota | 10fe7e5 | 2020-02-25 17:00:12 -0500 | [diff] [blame] | 41 | # Generic logging library (sw_lib_base_log) |
| 42 | sw_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 Sota | 30eb41a | 2019-12-12 15:25:50 -0600 | [diff] [blame] | 52 | test('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 | |