[cmake]remove redundant linking in chip_main.cmake (#12454)

diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake
index bdf74e8..3c0aa18 100755
--- a/examples/all-clusters-app/ameba/chip_main.cmake
+++ b/examples/all-clusters-app/ameba/chip_main.cmake
@@ -13,23 +13,6 @@
 list(
     APPEND ${list_chip_main_sources}
 
-    #chip app
-    ${chip_dir}/src/app/Command.cpp
-    ${chip_dir}/src/app/CommandHandler.cpp
-    ${chip_dir}/src/app/InteractionModelEngine.cpp
-    ${chip_dir}/src/app/CommandSender.cpp
-    ${chip_dir}/src/app/decoder.cpp
-    ${chip_dir}/src/app/encoder-common.cpp
-    ${chip_dir}/src/app/EventManagement.cpp
-    ${chip_dir}/src/app/ReadClient.cpp
-    ${chip_dir}/src/app/ReadHandler.cpp
-    ${chip_dir}/src/app/TimedHandler.cpp
-    ${chip_dir}/src/app/WriteClient.cpp
-    ${chip_dir}/src/app/WriteHandler.cpp
-    ${chip_dir}/src/app/util/CHIPDeviceCallbacksMgr.cpp
-    ${chip_dir}/src/app/util/esi-management.cpp
-    ${chip_dir}/src/app/reporting/Engine.cpp
-
     ${chip_dir}/zzz_generated/all-clusters-app/zap-generated/attribute-size.cpp
     ${chip_dir}/zzz_generated/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp
     ${chip_dir}/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp
diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake
index 007b524..e5ad477 100755
--- a/examples/lighting-app/ameba/chip_main.cmake
+++ b/examples/lighting-app/ameba/chip_main.cmake
@@ -13,23 +13,6 @@
 list(
     APPEND ${list_chip_main_sources}
 
-    #chip app
-    ${chip_dir}/src/app/Command.cpp
-    ${chip_dir}/src/app/CommandHandler.cpp
-    ${chip_dir}/src/app/InteractionModelEngine.cpp
-    ${chip_dir}/src/app/CommandSender.cpp
-    ${chip_dir}/src/app/decoder.cpp
-    ${chip_dir}/src/app/encoder-common.cpp
-    ${chip_dir}/src/app/EventManagement.cpp
-    ${chip_dir}/src/app/ReadClient.cpp
-    ${chip_dir}/src/app/ReadHandler.cpp
-    ${chip_dir}/src/app/TimedHandler.cpp
-    ${chip_dir}/src/app/WriteClient.cpp
-    ${chip_dir}/src/app/WriteHandler.cpp
-    ${chip_dir}/src/app/util/CHIPDeviceCallbacksMgr.cpp
-    ${chip_dir}/src/app/util/esi-management.cpp
-    ${chip_dir}/src/app/reporting/Engine.cpp
-
     ${chip_dir}/zzz_generated/lighting-app/zap-generated/attribute-size.cpp
     ${chip_dir}/zzz_generated/lighting-app/zap-generated/CHIPClientCallbacks.cpp
     ${chip_dir}/zzz_generated/lighting-app/zap-generated/callback-stub.cpp