1if (CONFIG_HAS_ALTERA_HAL)
2  #nios2 core/system level headers
3  zephyr_include_directories(
4    include
5    altera_hal/HAL/inc
6    )
7
8  zephyr_compile_definitions(ZEPHYR_RTOS)
9  add_subdirectory(altera_hal/HAL/src)
10
11  if(CONFIG_ALTERA_AVALON_TIMER)
12    zephyr_include_directories(
13      drivers/altera_avalon_timer/inc
14      drivers/altera_avalon_timer/HAL/inc
15      )
16    add_subdirectory(drivers/altera_avalon_timer/HAL/src)
17  endif()
18
19  if(CONFIG_ALTERA_AVALON_SYSID)
20    zephyr_include_directories(
21      drivers/altera_avalon_sysid/inc
22      drivers/altera_avalon_sysid/HAL/inc
23      )
24    add_subdirectory(drivers/altera_avalon_sysid/HAL/src)
25  endif()
26
27  if(CONFIG_ALTERA_AVALON_MSGDMA)
28    zephyr_include_directories(
29      drivers/altera_msgdma/inc
30      drivers/altera_msgdma/HAL/inc
31      )
32    add_subdirectory(drivers/altera_msgdma/HAL/src)
33  endif()
34
35  if(CONFIG_ALTERA_AVALON_I2C)
36    zephyr_include_directories(
37      drivers/altera_avalon_i2c/inc
38      drivers/altera_avalon_i2c/HAL/inc
39      )
40    add_subdirectory(drivers/altera_avalon_i2c/HAL/src)
41  endif()
42
43  if(CONFIG_ALTERA_AVALON_QSPI)
44    zephyr_include_directories(
45      drivers/altera_generic_qspi_controller2/inc
46      drivers/altera_generic_qspi_controller2/HAL/inc
47      )
48  endif()
49endif()
50