openisa: Make openisa hal a zephyr_library

Stops leaking long source paths in build directories and makes them
deterministic.

When building samples/hello_world for rv32m1_vega_ri5cy, this changes
the build directories from:

build/
└── zephyr
    └── CMakeFiles
        └── zephyr.dir
            └── home
                └── maureen
                    └── zephyrproject
                        └── modules
                            └── hal
                                └── openisa
                                    └── vega_sdk_riscv
                                        └── devices
                                            └── RV32M1
                                                └── drivers
                                                    ├── fsl_clock.c.obj
                                                    └── fsl_lpuart.c.obj
to:

build/
└── modules
    └── openisa
        └── lib..__modules__hal__openisa.a

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2020-06-01 09:33:16 -05:00
parent 742d0383aa
commit 40d049f69c
3 changed files with 13 additions and 9 deletions

View File

@ -1,3 +1,7 @@
if(CONFIG_VEGA_SDK_HAL)
zephyr_library()
endif()
add_subdirectory_ifdef(
CONFIG_VEGA_SDK_HAL
vega_sdk_riscv

View File

@ -1,10 +1,10 @@
zephyr_include_directories(.)
zephyr_sources(fsl_clock.c)
zephyr_sources_ifdef(CONFIG_ENTROPY_RV32M1_TRNG fsl_trng.c)
zephyr_sources_ifdef(CONFIG_HAS_RV32M1_CAU3_BLE fsl_cau3_ble.c)
zephyr_sources_ifdef(CONFIG_I2C_RV32M1_LPI2C fsl_lpi2c.c)
zephyr_sources_ifdef(CONFIG_PWM_RV32M1_TPM fsl_tpm.c)
zephyr_sources_ifdef(CONFIG_SOC_FLASH_RV32M1 fsl_flash.c)
zephyr_sources_ifdef(CONFIG_SPI_RV32M1_LPSPI fsl_lpspi.c)
zephyr_sources_ifdef(CONFIG_UART_RV32M1_LPUART fsl_lpuart.c)
zephyr_library_sources(fsl_clock.c)
zephyr_library_sources_ifdef(CONFIG_ENTROPY_RV32M1_TRNG fsl_trng.c)
zephyr_library_sources_ifdef(CONFIG_HAS_RV32M1_CAU3_BLE fsl_cau3_ble.c)
zephyr_library_sources_ifdef(CONFIG_I2C_RV32M1_LPI2C fsl_lpi2c.c)
zephyr_library_sources_ifdef(CONFIG_PWM_RV32M1_TPM fsl_tpm.c)
zephyr_library_sources_ifdef(CONFIG_SOC_FLASH_RV32M1 fsl_flash.c)
zephyr_library_sources_ifdef(CONFIG_SPI_RV32M1_LPSPI fsl_lpspi.c)
zephyr_library_sources_ifdef(CONFIG_UART_RV32M1_LPUART fsl_lpuart.c)

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources(
zephyr_library_sources(
cfgs_rv32m1/fsl_xcvr_ant_config.c
cfgs_rv32m1/fsl_xcvr_ble_config.c
cfgs_rv32m1/fsl_xcvr_common_config.c