Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/cmake/uuid-registry.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# Simple target. FOUR (really 4.5, as LIBRARY builds use the same
# CMakeLists.txt but differ significantly in how it executes)
# different cmake environments into which it needs to build.
is_zephyr(zephyr_is)
if(zephyr_is)
is_zephyr(zephyr)
if(zephyr)
set(TOPDIR ${sof_top_dir})
set(UUID_REG_H ${PROJECT_BINARY_DIR}/include/generated/uuid-registry.h)
set(DEP_TARGET zephyr_interface)
Expand Down
10 changes: 4 additions & 6 deletions src/audio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,17 @@ sof_list_append_ifdef(CONFIG_COMP_BLOB base_files data_blob.c)

### (end of common files)

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
${base_files}
)

return()
endif()

### XTOS normal build (not shared library) ###
elseif(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
### not shared library, e.g. testbench ###

if(NOT CONFIG_COMP_MODULE_SHARED_LIBRARY_BUILD)
add_local_sources(sof
host-legacy.c
${base_files}
Expand Down
15 changes: 0 additions & 15 deletions src/audio/codec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,3 @@ if(zephyr) ### Zephyr ###

return()
endif()

### XTOS ###
if(CONFIG_DTS_CODEC)
add_local_sources(sof dts/dts.c)
target_compile_definitions(sof PRIVATE -DDTS_MATH_INT32 -DDTS_XTENSA)

if (CONFIG_DTS_CODEC_STUB)
add_local_sources(sof dts/dts_stub.c)
else()
sof_add_static_library(DtsCodec
${SOF_ROOT_SOURCE_DIRECTORY}/third_party/lib/libdts-sof-interface-i32.a)
target_include_directories(sof PRIVATE ${CMAKE_SOURCE_DIR}/third_party/include)
endif()

endif()
4 changes: 2 additions & 2 deletions src/audio/google/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ if(zephyr) ### Zephyr ###
return()
endif()

### XTOS build rules ###
if((NOT CONFIG_LIBRARY) OR CONFIG_LIBRARY_STATIC)
### Library build rules ###
if(CONFIG_LIBRARY_STATIC)
if(CONFIG_COMP_GOOGLE_HOTWORD_DETECT)
add_local_sources(sof
google_hotword_detect.c
Expand Down
6 changes: 1 addition & 5 deletions src/audio/rtnr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,11 @@ if(zephyr) ### Zephyr ###
zephyr_library_sources(rtnr.c)
zephyr_library_sources_ifdef(CONFIG_COMP_RTNR_STUB rtnr_stub.c)

else() ### XTOS ###
else() ### library, e.g. testbench or plugin ###

add_local_sources(sof rtnr.c)
if (CONFIG_COMP_RTNR_STUB)
add_local_sources(sof rtnr_stub.c)
elseif(CONFIG_TIGERLAKE)
add_subdirectory(rtklib/tgl)
elseif(CONFIG_MT8195)
add_subdirectory(rtklib/mt8195)
endif()

endif()
10 changes: 0 additions & 10 deletions src/audio/smart_amp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,4 @@ if(zephyr) ### Zephyr ###
zephyr_include_directories(CONFIG_MAXIM_DSM ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc/)
endif()

else() ### XTOS

if(CONFIG_MAXIM_DSM)
if(NOT CONFIG_MAXIM_DSM_STUB)
sof_add_static_library(dsm ${CMAKE_CURRENT_LIST_DIR}/lib/release/dsm_lib/libdsm.a)
endif()

target_include_directories(sof PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/dsm_api/inc)
endif()

endif()
6 changes: 3 additions & 3 deletions src/audio/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ endif()

sof_list_append_ifdef(CONFIG_COMP_SRC_LITE base_files src_lite.c)

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

if(CONFIG_COMP_SRC STREQUAL "m")

Expand All @@ -24,7 +24,7 @@ if(it_is) ### Zephyr ###

endif()

else() ### XTOS ###
else() ### library, e.g. testbench or plugin ###

add_local_sources(sof ${base_files})

Expand Down
8 changes: 2 additions & 6 deletions src/debug/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ endif()

add_subdirectory(tester)

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

add_subdirectory(debug_stream)
add_subdirectory(telemetry)

zephyr_library_sources_ifdef(CONFIG_COLD_STORE_EXECUTE_DEBUG dram.c)

else() ### Not Zephyr ###

add_local_sources(sof panic.c)

endif() # Zephyr
10 changes: 2 additions & 8 deletions src/debug/tester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set(base_files
tester_simple_dram_test.c
)

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

if(CONFIG_COMP_TESTER STREQUAL "m")

Expand All @@ -20,10 +20,4 @@ if(it_is) ### Zephyr ###

endif()

else() ### XTOS ###

if(CONFIG_COMP_TESTER)
add_local_sources(sof ${base_files})
endif()

endif()
2 changes: 0 additions & 2 deletions src/idc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ is_zephyr(zephyr)
if(zephyr)
add_local_sources_ifdef(CONFIG_SMP sof idc.c)
add_local_sources(sof zephyr_idc.c)
else()
add_local_sources(sof idc.c)
endif()
32 changes: 2 additions & 30 deletions src/init/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,11 @@
# SPDX-License-Identifier: BSD-3-Clause

is_zephyr(it_is)
if(it_is) ### Zephyr ###

is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
init.c
ext_manifest.c
)


else() ### Not Zephyr ###


add_local_sources(sof init.c)

add_library(ext_manifest STATIC "")

# define compiler version
set_property(TARGET ext_manifest APPEND
PROPERTY COMPILE_DEFINITIONS
XCC_TOOLS_VERSION="${XCC_TOOLS_VERSION}")

# and optimization settings
get_optimization_flag(optimization_flag)
set_property(TARGET ext_manifest APPEND
PROPERTY COMPILE_DEFINITIONS
CC_OPTIMIZE_FLAGS="-${optimization_flag}")

add_local_sources(ext_manifest
ext_manifest.c)
sof_append_relative_path_definitions(ext_manifest)

target_link_libraries(ext_manifest sof_options)
target_link_libraries(sof_static_libraries INTERFACE ext_manifest)


endif() # Zephyr
11 changes: 2 additions & 9 deletions src/ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ add_local_sources(sof
notification_pool.c
)

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

# dma-copy only used for dma-trace
zephyr_library_sources_ifdef(CONFIG_TRACE dma-copy.c)
Expand All @@ -25,18 +25,11 @@ if (CONFIG_SOC_SERIES_INTEL_CAVS_V25 OR CONFIG_SOC_SERIES_INTEL_ADSP_ACE)
)
endif()


else() ### Not Zephyr ###


if (CONFIG_TRACE)
add_local_sources(sof
dma-copy.c)
endif()

if (CONFIG_LIBRARY)
return()
endif()


endif() # Zephyr
11 changes: 2 additions & 9 deletions src/ipc/ipc3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,11 @@ add_local_sources(sof
dai.c
)

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
host-page-table.c
)

else() ### Not Zephyr ###

if (CONFIG_HOST_PTABLE)
add_local_sources(sof
host-page-table.c)
endif()

endif() # Zephyr
12 changes: 2 additions & 10 deletions src/ipc/ipc4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,15 @@ add_local_sources(sof
notification.c
)


is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources_ifdef(CONFIG_AMS
ams_helpers.c
)


else() ### Not Zephyr ####


add_local_sources(sof
ams_helpers.c
)

target_include_directories(sof_options INTERFACE ${RIMAGE_TOP}/src/include)


endif() # Zephyr
11 changes: 0 additions & 11 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,4 @@ if(zephyr) ### Zephyr ###
add_local_sources(sof clk.c)
endif()

else() ### XTOS ###

add_local_sources(sof
${common_files}
lib.c
alloc.c
pm_runtime.c
clk.c
wait.c
)

endif()
6 changes: 3 additions & 3 deletions src/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ if(CONFIG_MATH_MU_LAW_CODEC)
list(APPEND base_files mu_law.c)
endif()

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
${base_files}
)

else() ### XTOS ###
else() ### library, e.g. testbench or plugin ###

add_local_sources(sof ${base_files})

Expand Down
6 changes: 3 additions & 3 deletions src/math/auditory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ if(CONFIG_MATH_32BIT_MEL_FILTERBANK)
list(APPEND base_files mel_filterbank_32.c)
endif()

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
${base_files}
)

else() ### XTOS ###
else() ### library, e.g. testbench or plugin ###

add_local_sources(sof ${base_files})

Expand Down
6 changes: 3 additions & 3 deletions src/math/fft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ if(CONFIG_MATH_32BIT_FFT)
list(APPEND base_files fft_32.c fft_32_hifi3.c)
endif()

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
${base_files}
)

else() ### XTOS ###
else() ### library, e.g. testbench or plugin ###

add_local_sources(sof ${base_files})

Expand Down
14 changes: 2 additions & 12 deletions src/schedule/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ if(CONFIG_SCHEDULE_DMA_SINGLE_CHANNEL AND NOT(CONFIG_DMA_DOMAIN))
list(APPEND base_files dma_single_chan_domain.c)
endif()

is_zephyr(it_is)
if(it_is) ### Zephyr ###
is_zephyr(zephyr)
if(zephyr) ### Zephyr ###

zephyr_library_sources(
${base_files}
Expand Down Expand Up @@ -46,14 +46,4 @@ zephyr_library_sources_ifdef(CONFIG_ZEPHYR_TWB_SCHEDULER
zephyr_twb_schedule.c
)

else() ### Not Zephyr ###

add_local_sources(sof
${base_files}
edf_schedule.c
ll_schedule.c
task.c
timer_domain.c
)

endif()
Loading