diff --git a/scripts/cmake/uuid-registry.cmake b/scripts/cmake/uuid-registry.cmake index 80b6310d1be8..0d3b287a7d62 100644 --- a/scripts/cmake/uuid-registry.cmake +++ b/scripts/cmake/uuid-registry.cmake @@ -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) diff --git a/src/audio/CMakeLists.txt b/src/audio/CMakeLists.txt index 0a4a78d53ca8..c7f45ca88bc8 100644 --- a/src/audio/CMakeLists.txt +++ b/src/audio/CMakeLists.txt @@ -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} diff --git a/src/audio/codec/CMakeLists.txt b/src/audio/codec/CMakeLists.txt index bdef3031ceb5..3a81324633e5 100644 --- a/src/audio/codec/CMakeLists.txt +++ b/src/audio/codec/CMakeLists.txt @@ -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() diff --git a/src/audio/google/CMakeLists.txt b/src/audio/google/CMakeLists.txt index d4d89ec8778a..fcb829306e16 100644 --- a/src/audio/google/CMakeLists.txt +++ b/src/audio/google/CMakeLists.txt @@ -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 diff --git a/src/audio/rtnr/CMakeLists.txt b/src/audio/rtnr/CMakeLists.txt index 034bd339a9ae..26ee76ac38f8 100644 --- a/src/audio/rtnr/CMakeLists.txt +++ b/src/audio/rtnr/CMakeLists.txt @@ -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() diff --git a/src/audio/smart_amp/CMakeLists.txt b/src/audio/smart_amp/CMakeLists.txt index 22d23b2820f9..cb4eac564634 100644 --- a/src/audio/smart_amp/CMakeLists.txt +++ b/src/audio/smart_amp/CMakeLists.txt @@ -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() diff --git a/src/audio/src/CMakeLists.txt b/src/audio/src/CMakeLists.txt index aab97633a2c1..469384694379 100644 --- a/src/audio/src/CMakeLists.txt +++ b/src/audio/src/CMakeLists.txt @@ -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") @@ -24,7 +24,7 @@ if(it_is) ### Zephyr ### endif() -else() ### XTOS ### +else() ### library, e.g. testbench or plugin ### add_local_sources(sof ${base_files}) diff --git a/src/debug/CMakeLists.txt b/src/debug/CMakeLists.txt index 3025cb8919f5..5cb8e8bd9c6c 100644 --- a/src/debug/CMakeLists.txt +++ b/src/debug/CMakeLists.txt @@ -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 diff --git a/src/debug/tester/CMakeLists.txt b/src/debug/tester/CMakeLists.txt index 2220c5b773b8..714f379a4966 100644 --- a/src/debug/tester/CMakeLists.txt +++ b/src/debug/tester/CMakeLists.txt @@ -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") @@ -20,10 +20,4 @@ if(it_is) ### Zephyr ### endif() -else() ### XTOS ### - - if(CONFIG_COMP_TESTER) - add_local_sources(sof ${base_files}) - endif() - endif() diff --git a/src/idc/CMakeLists.txt b/src/idc/CMakeLists.txt index 26a47bd50d62..1cedc1f739f4 100644 --- a/src/idc/CMakeLists.txt +++ b/src/idc/CMakeLists.txt @@ -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() diff --git a/src/init/CMakeLists.txt b/src/init/CMakeLists.txt index efa155793621..5bf15761fa29 100644 --- a/src/init/CMakeLists.txt +++ b/src/init/CMakeLists.txt @@ -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 diff --git a/src/ipc/CMakeLists.txt b/src/ipc/CMakeLists.txt index 5639c2fe7df6..15fab54b3c30 100644 --- a/src/ipc/CMakeLists.txt +++ b/src/ipc/CMakeLists.txt @@ -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) @@ -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 diff --git a/src/ipc/ipc3/CMakeLists.txt b/src/ipc/ipc3/CMakeLists.txt index db1e6825085c..02a2d337c53d 100644 --- a/src/ipc/ipc3/CMakeLists.txt +++ b/src/ipc/ipc3/CMakeLists.txt @@ -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 diff --git a/src/ipc/ipc4/CMakeLists.txt b/src/ipc/ipc4/CMakeLists.txt index 5a4d271e7f13..02c56130ed11 100644 --- a/src/ipc/ipc4/CMakeLists.txt +++ b/src/ipc/ipc4/CMakeLists.txt @@ -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 diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 631731675e5f..f7a37d50cd72 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -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() diff --git a/src/math/CMakeLists.txt b/src/math/CMakeLists.txt index 047c4c2d510b..44a42884455d 100644 --- a/src/math/CMakeLists.txt +++ b/src/math/CMakeLists.txt @@ -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}) diff --git a/src/math/auditory/CMakeLists.txt b/src/math/auditory/CMakeLists.txt index ac89bc544f48..b24cf968f237 100644 --- a/src/math/auditory/CMakeLists.txt +++ b/src/math/auditory/CMakeLists.txt @@ -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}) diff --git a/src/math/fft/CMakeLists.txt b/src/math/fft/CMakeLists.txt index cfdf61b2bd8a..82b8aee77b4d 100644 --- a/src/math/fft/CMakeLists.txt +++ b/src/math/fft/CMakeLists.txt @@ -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}) diff --git a/src/schedule/CMakeLists.txt b/src/schedule/CMakeLists.txt index 7646a55191ba..afa1cdc95324 100644 --- a/src/schedule/CMakeLists.txt +++ b/src/schedule/CMakeLists.txt @@ -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} @@ -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()