-
Notifications
You must be signed in to change notification settings - Fork 349
cmake/zephyr: unify cmake rules for lib, probes and... #9931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kv2019i
merged 6 commits into
thesofproject:main
from
kv2019i:202403-cmake-lib-probe-and-misc
Apr 3, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
62dc2ae
cmake/zephyr: unify cmake rules for src/lib
kv2019i a815a4e
cmake/zephyr: unify cmake rules for src/library_manager
kv2019i 31a1b4a
cmake/zephyr: unify cmake rules for src/trace
kv2019i 8b56640
cmake/zephyr: unify cmake rules for src/logging
kv2019i a3454e9
cmake/zephyr: unify cmake rules for src/samples
kv2019i 940e1c3
cmake/zephyr: unify cmake rules for src/probe
kv2019i File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,46 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| set(common_files notifier.c dma.c dai.c) | ||
|
|
||
| if(CONFIG_LIBRARY) | ||
| add_local_sources(sof | ||
| lib.c | ||
| dai.c | ||
| dma.c | ||
| notifier.c | ||
| agent.c) | ||
| return() | ||
| add_local_sources(sof | ||
| lib.c | ||
| agent.c | ||
| ${common_files} | ||
| ) | ||
| return() | ||
| endif() | ||
|
|
||
| if(CONFIG_HAVE_AGENT) | ||
| add_local_sources(sof agent.c) | ||
| add_local_sources(sof agent.c) | ||
| endif() | ||
|
|
||
| add_local_sources(sof | ||
| lib.c | ||
| alloc.c | ||
| notifier.c | ||
| pm_runtime.c | ||
| clk.c | ||
| dma.c | ||
| dai.c | ||
| wait.c | ||
| cpu-clk-manager.c | ||
| ) | ||
|
|
||
| if(CONFIG_AMS) | ||
| add_local_sources(sof ams.c) | ||
| add_local_sources(sof ams.c) | ||
| endif() | ||
|
|
||
| if(CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL) | ||
| add_local_sources(sof cpu-clk-manager.c) | ||
| endif() | ||
|
|
||
| is_zephyr(zephyr) | ||
| if(zephyr) ### Zephyr ### | ||
|
|
||
| add_local_sources(sof ${common_files}) | ||
|
|
||
| if(NOT CONFIG_SOF_ZEPHYR_NO_SOF_CLOCK) | ||
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| if(CONFIG_LIBRARY_MANAGER) | ||
| add_local_sources(sof lib_manager.c, lib_notifications.c) | ||
| add_local_sources(sof lib_manager.c lib_notification.c) | ||
|
|
||
| if (CONFIG_MM_DRV AND CONFIG_LLEXT) | ||
| add_local_sources(sof llext_manager.c) | ||
| endif() | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources_ifdef(CONFIG_LOG_BACKEND_SOF_PROBE sof log_backend_probe.c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof probe.c) | ||
| if(CONFIG_PROBE STREQUAL "m") | ||
| add_subdirectory(llext ${PROJECT_BINARY_DIR}/probe_llext) | ||
| add_dependencies(app probe) | ||
| elseif(CONFIG_PROBE) | ||
| add_local_sources(sof probe.c) | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| if(CONFIG_SAMPLE_SMART_AMP) | ||
| if(CONFIG_IPC_MAJOR_3) | ||
| add_local_sources(sof | ||
| smart_amp_test_ipc3.c | ||
| ) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| add_local_sources(sof | ||
| smart_amp_test_ipc4.c | ||
| ) | ||
| endif() | ||
|
|
||
| if(CONFIG_IPC_MAJOR_3) | ||
| set(ipc_suffix ipc3) | ||
| elseif(CONFIG_IPC_MAJOR_4) | ||
| set(ipc_suffix ipc4) | ||
| endif() | ||
|
|
||
| if(CONFIG_SAMPLE_SMART_AMP STREQUAL "m") | ||
| add_subdirectory(smart_amp_test_llext ${PROJECT_BINARY_DIR}/smart_amp_test_llext) | ||
| add_dependencies(app smart_amp_test) | ||
| elseif(CONFIG_SAMPLE_SMART_AMP) | ||
| add_local_sources(sof smart_amp_test_${ipc_suffix}.c) | ||
| endif() | ||
|
|
||
| if(CONFIG_SAMPLE_KEYPHRASE) | ||
| add_local_sources(sof | ||
| detect_test.c | ||
| ) | ||
| add_local_sources(sof detect_test.c) | ||
| endif() | ||
|
|
||
| if(CONFIG_KWD_NN_SAMPLE_KEYPHRASE) | ||
| add_local_sources(sof kwd_nn_detect_test.c) | ||
| add_local_sources(sof kwd_nn_detect_test.c) | ||
| endif() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| add_local_sources(sof dma-trace.c trace.c) | ||
| if(CONFIG_TRACE) | ||
| add_local_sources(sof dma-trace.c trace.c) | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.