From f7be5fc84b934dfe588acd947fb75abc6833fde8 Mon Sep 17 00:00:00 2001 From: "Man, Jianting (Meco)" <920369182@qq.com> Date: Mon, 3 Oct 2022 10:43:08 -0400 Subject: [PATCH] =?UTF-8?q?[bsp][applications][sconscript]=20=E6=95=B4?= =?UTF-8?q?=E7=90=86=E7=BB=9F=E4=B8=80sconscript=E6=A0=BC=E5=BC=8F=20(#648?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bsp][sconscript] 整理统一sconscript格式 * update * update --- bsp/CME_M7/applications/SConscript | 14 +++++++----- .../acm32f0x0-nucleo/applications/SConscript | 12 ++++++---- .../acm32f4xx-nucleo/applications/SConscript | 12 ++++++---- bsp/airm2m/air105/applications/SConscript | 15 ++++++++----- bsp/allwinner_tina/applications/SConscript | 12 +++++++--- bsp/allwinner_tina/drivers/spi/SConscript | 2 +- bsp/amebaz/SConscript | 6 ++--- bsp/amebaz/applications/SConscript | 13 +++++++---- bsp/amebaz/drivers/wlan/SConscript | 7 ++---- bsp/apollo2/applications/SConscript | 12 ++++++---- bsp/asm9260t/SConscript | 6 ++--- bsp/asm9260t/applications/SConscript | 14 +++++++----- bsp/at32/at32f403a-start/SConscript | 6 ++--- .../at32f403a-start/applications/SConscript | 18 +++++++-------- bsp/at32/at32f407-start/SConscript | 6 ++--- .../at32f407-start/applications/SConscript | 18 +++++++-------- .../at32f413-start/applications/SConscript | 18 +++++++-------- .../at32f415-start/applications/SConscript | 18 +++++++-------- .../at32f435-start/applications/SConscript | 18 +++++++-------- .../at32f437-start/applications/SConscript | 18 +++++++-------- bsp/at91/at91sam9260/applications/SConscript | 14 +++++++----- bsp/at91/at91sam9g45/applications/SConscript | 14 +++++++----- bsp/beaglebone/applications/SConscript | 14 +++++++----- bsp/bm3803/applications/SConscript | 14 +++++++----- bsp/ck802/applications/SConscript | 15 ++++++++----- bsp/dm365/applications/SConscript | 10 ++++++--- bsp/essemi/es32f0654/applications/SConscript | 14 +++++++----- bsp/essemi/es32f365x/applications/SConscript | 14 +++++++----- bsp/frdm-k64f/applications/SConscript | 14 +++++++----- .../mb9x/mb9bf506r/applications/SConscript | 12 +++++++--- .../mb9x/mb9bf568r/applications/SConscript | 14 +++++++----- .../mb9x/mb9bf618s/applications/SConscript | 14 +++++++----- .../arm/gd32103c-eval/applications/SConscript | 14 +++++++----- .../arm/gd32105c-eval/applications/SConscript | 14 +++++++----- .../gd32105r-start/applications/SConscript | 14 +++++++----- .../arm/gd32107c-eval/applications/SConscript | 14 +++++++----- .../gd32205r-start/applications/SConscript | 14 +++++++----- .../arm/gd32207i-eval/applications/SConscript | 14 +++++++----- .../arm/gd32303e-eval/applications/SConscript | 14 +++++++----- .../gd32305r-start/applications/SConscript | 14 +++++++----- .../gd32307e-start/applications/SConscript | 14 +++++++----- .../gd32407v-start/applications/SConscript | 14 +++++++----- .../arm/gd32450z-eval/applications/SConscript | 14 +++++++----- bsp/gd32105c-eval/applications/SConscript | 14 +++++++----- bsp/gd32107c-eval/applications/SConscript | 14 +++++++----- bsp/gd32303e-eval/applications/SConscript | 14 +++++++----- bsp/gd32350r-eval/applications/SConscript | 14 +++++++----- bsp/gd32450z-eval/applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- bsp/hc32l136/applications/SConscript | 15 ++++++++----- bsp/hc32l196/applications/SConscript | 15 ++++++++----- bsp/hifive1/applications/SConscript | 14 +++++++----- .../hk32f030c8-mini/applications/SConscript | 18 +++++++-------- bsp/imx6sx/cortex-a9/applications/SConscript | 14 +++++++----- bsp/imx6ul/applications/SConscript | 14 +++++++----- bsp/lm3s8962/applications/SConscript | 14 +++++++----- bsp/lm3s9b9x/applications/SConscript | 14 +++++++----- bsp/lm4f232/applications/SConscript | 14 +++++++----- bsp/loongson/ls1bdev/applications/SConscript | 12 +++++++--- bsp/loongson/ls1cdev/applications/SConscript | 12 +++++++--- bsp/lpc1114/applications/SConscript | 12 +++++++--- bsp/lpc176x/applications/SConscript | 12 +++++++--- bsp/lpc178x/applications/SConscript | 14 +++++++----- bsp/lpc2148/applications/SConscript | 14 +++++++----- bsp/lpc2478/applications/SConscript | 14 +++++++----- bsp/lpc408x/applications/SConscript | 12 +++++++--- bsp/lpc43xx/M0/applications/SConscript | 14 +++++++----- bsp/lpc43xx/M4/applications/SConscript | 18 ++++++++------- bsp/lpc5410x/applications/SConscript | 14 +++++++----- bsp/lpc54114-lite/applications/SConscript | 10 ++++++--- .../applications/SConscript | 14 +++++++----- bsp/lpc824/applications/SConscript | 14 +++++++----- bsp/m16c62p/applications/SConscript | 12 +++++++--- .../max32660-evsys/applications/SConscript | 12 ++++++---- bsp/microchip/samc21/applications/SConscript | 13 +++++++---- bsp/microchip/same54/applications/SConscript | 13 +++++++---- bsp/microchip/same70/applications/SConscript | 13 +++++++---- bsp/microchip/saml10/applications/SConscript | 13 +++++++---- bsp/mini2440/applications/SConscript | 14 +++++++----- bsp/mini4020/applications/SConscript | 12 +++++++--- bsp/mm32f103x/applications/SConscript | 12 +++++++--- bsp/mm32f327x/applications/SConscript | 12 +++++++--- bsp/mm32l07x/applications/SConscript | 12 +++++++--- bsp/mm32l3xx/applications/SConscript | 12 +++++++--- bsp/n32/n32g45xvl-stb/applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- .../templates/nrfx/applications/SConscript | 12 ++++++---- bsp/nrf5x/nrf51822/applications/SConscript | 12 ++++++---- bsp/nrf5x/nrf52832/applications/SConscript | 17 +++++++------- bsp/nrf5x/nrf52833/applications/SConscript | 12 ++++++---- bsp/nrf5x/nrf52840/applications/SConscript | 12 ++++++---- bsp/nuvoton/nk-980iot/applications/SConscript | 22 +++++++------------ bsp/nuvoton/nk-n9h30/applications/SConscript | 22 +++++++------------ bsp/nuvoton/nk-rtu980/applications/SConscript | 12 ++++++---- .../numaker-iot-m467/applications/SConscript | 22 +++++++------------ .../numaker-iot-m487/applications/SConscript | 22 +++++++------------ .../numaker-m032ki/applications/SConscript | 22 +++++++------------ .../numaker-m2354/applications/SConscript | 22 +++++++------------ .../numaker-m467hj/applications/SConscript | 22 +++++++------------ .../numaker-pfm-m487/applications/SConscript | 22 +++++++------------ .../applications/SConscript | 14 +++++++----- .../raspi2/applications/SConscript | 12 +++++++--- .../raspi3-32/applications/SConscript | 12 +++++++--- .../raspi4-32/applications/SConscript | 12 +++++++--- .../raspi4-64/applications/SConscript | 12 +++++++--- bsp/rockchip/rk2108/applications/SConscript | 12 +++++++--- bsp/rx/applications/SConscript | 14 +++++++----- bsp/sam7x/applications/SConscript | 12 +++++++--- bsp/samd21/applications/SConscript | 19 ++++++++-------- .../stm32f0xx/applications/SConscript | 10 ++++++--- .../stm32f10x/applications/SConscript | 10 ++++++--- .../stm32f3xx/applications/SConscript | 15 ++++++++----- .../stm32f4xx/applications/SConscript | 15 ++++++++----- .../stm32f7xx/applications/SConscript | 15 ++++++++----- .../stm32h7xx/applications/SConscript | 17 ++++++++------ .../stm32l1xx/applications/SConscript | 10 ++++++--- .../stm32l4xx/applications/SConscript | 12 +++++++--- .../stm32l5xx/applications/SConscript | 12 +++++++--- .../stm32mp1xx/applications/SConscript | 10 ++++++--- .../stm32wbxx/applications/SConscript | 12 +++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 10 ++++++--- .../stm32f107-uc-eval/applications/SConscript | 10 ++++++--- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 13 +++++++---- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 13 ++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 17 ++++++++------ .../applications/SConscript | 16 ++++++++------ .../applications/SConscript | 17 ++++++++------ .../applications/SConscript | 17 ++++++++------ .../applications/SConscript | 17 ++++++++------ .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 12 +++++++--- .../stm32l431-BearPi/applications/SConscript | 12 +++++++--- .../applications/SConscript | 12 +++++++--- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 12 +++++++--- .../applications/SConscript | 15 ++++++++----- .../applications/SConscript | 16 ++++++++------ .../applications/SConscript | 12 +++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 10 ++++++--- .../applications/SConscript | 12 +++++++--- .../applications/SConscript | 12 +++++++--- .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- .../applications/SConscript | 14 +++++++----- bsp/synopsys/boards/applications/SConscript | 14 +++++++----- bsp/taihu/applications/SConscript | 10 ++++++--- bsp/tm4c123bsp/applications/SConscript | 10 ++++++--- bsp/tm4c129x/applications/SConscript | 14 +++++++----- bsp/upd70f3454/applications/SConscript | 12 +++++++--- .../ch32f103c8-core/applications/SConscript | 18 +++++++-------- .../arm/ch32f203r-evt/applications/SConscript | 18 +++++++-------- bsp/wch/arm/ch579m/applications/SConscript | 18 +++++++-------- .../ch32v103r-evt/applications/SConscript | 18 +++++++-------- .../risc-v/ch569w-evt/applications/SConscript | 16 +++++++------- bsp/x86/applications/SConscript | 14 +++++++----- bsp/xplorer4330/applications/SConscript | 14 +++++++----- bsp/yichip/yc3121-pos/applications/SConscript | 12 +++++++--- bsp/zynqmp-r5-axu4ev/applications/SConscript | 14 +++++++----- 188 files changed, 1596 insertions(+), 1000 deletions(-) diff --git a/bsp/CME_M7/applications/SConscript b/bsp/CME_M7/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/CME_M7/applications/SConscript +++ b/bsp/CME_M7/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/acm32/acm32f0x0-nucleo/applications/SConscript b/bsp/acm32/acm32f0x0-nucleo/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/acm32/acm32f0x0-nucleo/applications/SConscript +++ b/bsp/acm32/acm32f0x0-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/acm32/acm32f4xx-nucleo/applications/SConscript b/bsp/acm32/acm32f4xx-nucleo/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/acm32/acm32f4xx-nucleo/applications/SConscript +++ b/bsp/acm32/acm32f4xx-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/airm2m/air105/applications/SConscript b/bsp/airm2m/air105/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/airm2m/air105/applications/SConscript +++ b/bsp/airm2m/air105/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/allwinner_tina/applications/SConscript b/bsp/allwinner_tina/applications/SConscript index e1255c80c8..9bb9abae89 100644 --- a/bsp/allwinner_tina/applications/SConscript +++ b/bsp/allwinner_tina/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/allwinner_tina/drivers/spi/SConscript b/bsp/allwinner_tina/drivers/spi/SConscript index cc32e09500..e98eb13101 100644 --- a/bsp/allwinner_tina/drivers/spi/SConscript +++ b/bsp/allwinner_tina/drivers/spi/SConscript @@ -2,7 +2,7 @@ from building import * cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/amebaz/SConscript b/bsp/amebaz/SConscript index fe0ae941ae..d7ad2b45f8 100644 --- a/bsp/amebaz/SConscript +++ b/bsp/amebaz/SConscript @@ -1,11 +1,11 @@ # for module compiling +from building import * import os -Import('RTT_ROOT') -cwd = str(Dir('#')) +cwd = GetCurrentDir() objs = [] -list = os.listdir(cwd) +list = os.listdir(cwd) for d in list: path = os.path.join(cwd, d) if os.path.isfile(os.path.join(path, 'SConscript')): diff --git a/bsp/amebaz/applications/SConscript b/bsp/amebaz/applications/SConscript index 1381e63e13..9bb9abae89 100644 --- a/bsp/amebaz/applications/SConscript +++ b/bsp/amebaz/applications/SConscript @@ -1,10 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/amebaz/drivers/wlan/SConscript b/bsp/amebaz/drivers/wlan/SConscript index 414abb50e6..530b05c0fe 100644 --- a/bsp/amebaz/drivers/wlan/SConscript +++ b/bsp/amebaz/drivers/wlan/SConscript @@ -2,14 +2,11 @@ import rtconfig from building import * cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] src = [] if GetDepend(['RT_USING_LWIP']): - src += Split(''' - drv_wifi.c - drv_wlan.c - ''') + src += ['drv_wifi.c', 'drv_wlan.c'] group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH) diff --git a/bsp/apollo2/applications/SConscript b/bsp/apollo2/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/apollo2/applications/SConscript +++ b/bsp/apollo2/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/asm9260t/SConscript b/bsp/asm9260t/SConscript index fe0ae941ae..d7ad2b45f8 100644 --- a/bsp/asm9260t/SConscript +++ b/bsp/asm9260t/SConscript @@ -1,11 +1,11 @@ # for module compiling +from building import * import os -Import('RTT_ROOT') -cwd = str(Dir('#')) +cwd = GetCurrentDir() objs = [] -list = os.listdir(cwd) +list = os.listdir(cwd) for d in list: path = os.path.join(cwd, d) if os.path.isfile(os.path.join(path, 'SConscript')): diff --git a/bsp/asm9260t/applications/SConscript b/bsp/asm9260t/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/asm9260t/applications/SConscript +++ b/bsp/asm9260t/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at32/at32f403a-start/SConscript b/bsp/at32/at32f403a-start/SConscript index fe0ae941ae..d7ad2b45f8 100644 --- a/bsp/at32/at32f403a-start/SConscript +++ b/bsp/at32/at32f403a-start/SConscript @@ -1,11 +1,11 @@ # for module compiling +from building import * import os -Import('RTT_ROOT') -cwd = str(Dir('#')) +cwd = GetCurrentDir() objs = [] -list = os.listdir(cwd) +list = os.listdir(cwd) for d in list: path = os.path.join(cwd, d) if os.path.isfile(os.path.join(path, 'SConscript')): diff --git a/bsp/at32/at32f403a-start/applications/SConscript b/bsp/at32/at32f403a-start/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/at32/at32f403a-start/applications/SConscript +++ b/bsp/at32/at32f403a-start/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at32/at32f407-start/SConscript b/bsp/at32/at32f407-start/SConscript index fe0ae941ae..d7ad2b45f8 100644 --- a/bsp/at32/at32f407-start/SConscript +++ b/bsp/at32/at32f407-start/SConscript @@ -1,11 +1,11 @@ # for module compiling +from building import * import os -Import('RTT_ROOT') -cwd = str(Dir('#')) +cwd = GetCurrentDir() objs = [] -list = os.listdir(cwd) +list = os.listdir(cwd) for d in list: path = os.path.join(cwd, d) if os.path.isfile(os.path.join(path, 'SConscript')): diff --git a/bsp/at32/at32f407-start/applications/SConscript b/bsp/at32/at32f407-start/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/at32/at32f407-start/applications/SConscript +++ b/bsp/at32/at32f407-start/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at32/at32f413-start/applications/SConscript b/bsp/at32/at32f413-start/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/at32/at32f413-start/applications/SConscript +++ b/bsp/at32/at32f413-start/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at32/at32f415-start/applications/SConscript b/bsp/at32/at32f415-start/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/at32/at32f415-start/applications/SConscript +++ b/bsp/at32/at32f415-start/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at32/at32f435-start/applications/SConscript b/bsp/at32/at32f435-start/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/at32/at32f435-start/applications/SConscript +++ b/bsp/at32/at32f435-start/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at32/at32f437-start/applications/SConscript b/bsp/at32/at32f437-start/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/at32/at32f437-start/applications/SConscript +++ b/bsp/at32/at32f437-start/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at91/at91sam9260/applications/SConscript b/bsp/at91/at91sam9260/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/at91/at91sam9260/applications/SConscript +++ b/bsp/at91/at91sam9260/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/at91/at91sam9g45/applications/SConscript b/bsp/at91/at91sam9g45/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/at91/at91sam9g45/applications/SConscript +++ b/bsp/at91/at91sam9g45/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/beaglebone/applications/SConscript b/bsp/beaglebone/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/beaglebone/applications/SConscript +++ b/bsp/beaglebone/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/bm3803/applications/SConscript b/bsp/bm3803/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/bm3803/applications/SConscript +++ b/bsp/bm3803/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/ck802/applications/SConscript b/bsp/ck802/applications/SConscript index 8cffec4949..f69ccc54e3 100644 --- a/bsp/ck802/applications/SConscript +++ b/bsp/ck802/applications/SConscript @@ -1,13 +1,16 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] - +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] CFLAGS = ' -c -mistack -ffunction-sections' group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CFLAGS=CFLAGS) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/dm365/applications/SConscript b/bsp/dm365/applications/SConscript index 85d211cf16..9bb9abae89 100644 --- a/bsp/dm365/applications/SConscript +++ b/bsp/dm365/applications/SConscript @@ -1,11 +1,15 @@ -import rtconfig -Import('RTT_ROOT') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') +CPPPATH = [cwd] -CPPPATH = [cwd, str(Dir('#'))] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/essemi/es32f0654/applications/SConscript b/bsp/essemi/es32f0654/applications/SConscript index e0c84e8f14..9bb9abae89 100644 --- a/bsp/essemi/es32f0654/applications/SConscript +++ b/bsp/essemi/es32f0654/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -CPPPATH = [cwd, str(Dir('#'))] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/essemi/es32f365x/applications/SConscript b/bsp/essemi/es32f365x/applications/SConscript index e0c84e8f14..9bb9abae89 100644 --- a/bsp/essemi/es32f365x/applications/SConscript +++ b/bsp/essemi/es32f365x/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -CPPPATH = [cwd, str(Dir('#'))] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/frdm-k64f/applications/SConscript b/bsp/frdm-k64f/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/frdm-k64f/applications/SConscript +++ b/bsp/frdm-k64f/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/fujitsu/mb9x/mb9bf506r/applications/SConscript b/bsp/fujitsu/mb9x/mb9bf506r/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/fujitsu/mb9x/mb9bf506r/applications/SConscript +++ b/bsp/fujitsu/mb9x/mb9bf506r/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/fujitsu/mb9x/mb9bf568r/applications/SConscript b/bsp/fujitsu/mb9x/mb9bf568r/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/fujitsu/mb9x/mb9bf568r/applications/SConscript +++ b/bsp/fujitsu/mb9x/mb9bf568r/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/fujitsu/mb9x/mb9bf618s/applications/SConscript b/bsp/fujitsu/mb9x/mb9bf618s/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/fujitsu/mb9x/mb9bf618s/applications/SConscript +++ b/bsp/fujitsu/mb9x/mb9bf618s/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32103c-eval/applications/SConscript b/bsp/gd32/arm/gd32103c-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32103c-eval/applications/SConscript +++ b/bsp/gd32/arm/gd32103c-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32105c-eval/applications/SConscript b/bsp/gd32/arm/gd32105c-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32105c-eval/applications/SConscript +++ b/bsp/gd32/arm/gd32105c-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32105r-start/applications/SConscript b/bsp/gd32/arm/gd32105r-start/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32105r-start/applications/SConscript +++ b/bsp/gd32/arm/gd32105r-start/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32107c-eval/applications/SConscript b/bsp/gd32/arm/gd32107c-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32107c-eval/applications/SConscript +++ b/bsp/gd32/arm/gd32107c-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32205r-start/applications/SConscript b/bsp/gd32/arm/gd32205r-start/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32205r-start/applications/SConscript +++ b/bsp/gd32/arm/gd32205r-start/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32207i-eval/applications/SConscript b/bsp/gd32/arm/gd32207i-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32207i-eval/applications/SConscript +++ b/bsp/gd32/arm/gd32207i-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32303e-eval/applications/SConscript b/bsp/gd32/arm/gd32303e-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32303e-eval/applications/SConscript +++ b/bsp/gd32/arm/gd32303e-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32305r-start/applications/SConscript b/bsp/gd32/arm/gd32305r-start/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32305r-start/applications/SConscript +++ b/bsp/gd32/arm/gd32305r-start/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32307e-start/applications/SConscript b/bsp/gd32/arm/gd32307e-start/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32307e-start/applications/SConscript +++ b/bsp/gd32/arm/gd32307e-start/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32407v-start/applications/SConscript b/bsp/gd32/arm/gd32407v-start/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32407v-start/applications/SConscript +++ b/bsp/gd32/arm/gd32407v-start/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32/arm/gd32450z-eval/applications/SConscript b/bsp/gd32/arm/gd32450z-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32/arm/gd32450z-eval/applications/SConscript +++ b/bsp/gd32/arm/gd32450z-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32105c-eval/applications/SConscript b/bsp/gd32105c-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32105c-eval/applications/SConscript +++ b/bsp/gd32105c-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32107c-eval/applications/SConscript b/bsp/gd32107c-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32107c-eval/applications/SConscript +++ b/bsp/gd32107c-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32303e-eval/applications/SConscript b/bsp/gd32303e-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32303e-eval/applications/SConscript +++ b/bsp/gd32303e-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32350r-eval/applications/SConscript b/bsp/gd32350r-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32350r-eval/applications/SConscript +++ b/bsp/gd32350r-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/gd32450z-eval/applications/SConscript b/bsp/gd32450z-eval/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/gd32450z-eval/applications/SConscript +++ b/bsp/gd32450z-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/applications/SConscript b/bsp/hc32/ev_hc32f460_lqfp100_v2/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/applications/SConscript +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/applications/SConscript b/bsp/hc32/ev_hc32f4a0_lqfp176/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/hc32/ev_hc32f4a0_lqfp176/applications/SConscript +++ b/bsp/hc32/ev_hc32f4a0_lqfp176/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/hc32l136/applications/SConscript b/bsp/hc32l136/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/hc32l136/applications/SConscript +++ b/bsp/hc32l136/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/hc32l196/applications/SConscript b/bsp/hc32l196/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/hc32l196/applications/SConscript +++ b/bsp/hc32l196/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/hifive1/applications/SConscript b/bsp/hifive1/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/hifive1/applications/SConscript +++ b/bsp/hifive1/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/hk32/hk32f030c8-mini/applications/SConscript b/bsp/hk32/hk32f030c8-mini/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/hk32/hk32f030c8-mini/applications/SConscript +++ b/bsp/hk32/hk32f030c8-mini/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/imx6sx/cortex-a9/applications/SConscript b/bsp/imx6sx/cortex-a9/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/imx6sx/cortex-a9/applications/SConscript +++ b/bsp/imx6sx/cortex-a9/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/imx6ul/applications/SConscript b/bsp/imx6ul/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/imx6ul/applications/SConscript +++ b/bsp/imx6ul/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lm3s8962/applications/SConscript b/bsp/lm3s8962/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lm3s8962/applications/SConscript +++ b/bsp/lm3s8962/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lm3s9b9x/applications/SConscript b/bsp/lm3s9b9x/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lm3s9b9x/applications/SConscript +++ b/bsp/lm3s9b9x/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lm4f232/applications/SConscript b/bsp/lm4f232/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lm4f232/applications/SConscript +++ b/bsp/lm4f232/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/loongson/ls1bdev/applications/SConscript b/bsp/loongson/ls1bdev/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/loongson/ls1bdev/applications/SConscript +++ b/bsp/loongson/ls1bdev/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/loongson/ls1cdev/applications/SConscript b/bsp/loongson/ls1cdev/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/loongson/ls1cdev/applications/SConscript +++ b/bsp/loongson/ls1cdev/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc1114/applications/SConscript b/bsp/lpc1114/applications/SConscript index e1255c80c8..9bb9abae89 100644 --- a/bsp/lpc1114/applications/SConscript +++ b/bsp/lpc1114/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc176x/applications/SConscript b/bsp/lpc176x/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/lpc176x/applications/SConscript +++ b/bsp/lpc176x/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc178x/applications/SConscript b/bsp/lpc178x/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc178x/applications/SConscript +++ b/bsp/lpc178x/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc2148/applications/SConscript b/bsp/lpc2148/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc2148/applications/SConscript +++ b/bsp/lpc2148/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc2478/applications/SConscript b/bsp/lpc2478/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc2478/applications/SConscript +++ b/bsp/lpc2478/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc408x/applications/SConscript b/bsp/lpc408x/applications/SConscript index 6452d39145..9bb9abae89 100644 --- a/bsp/lpc408x/applications/SConscript +++ b/bsp/lpc408x/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc43xx/M0/applications/SConscript b/bsp/lpc43xx/M0/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc43xx/M0/applications/SConscript +++ b/bsp/lpc43xx/M0/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc43xx/M4/applications/SConscript b/bsp/lpc43xx/M4/applications/SConscript index 773b8d0422..ab3da9c7ce 100644 --- a/bsp/lpc43xx/M4/applications/SConscript +++ b/bsp/lpc43xx/M4/applications/SConscript @@ -1,13 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -group = DefineGroup('Applications', src, - depend = [''], CPPPATH = CPPPATH, - CPPDEFINES = ['BOOT_PROCESSOR']) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = ['BOOT_PROCESSOR']) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/lpc5410x/applications/SConscript b/bsp/lpc5410x/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc5410x/applications/SConscript +++ b/bsp/lpc5410x/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc54114-lite/applications/SConscript b/bsp/lpc54114-lite/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/lpc54114-lite/applications/SConscript +++ b/bsp/lpc54114-lite/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc54608-LPCXpresso/applications/SConscript b/bsp/lpc54608-LPCXpresso/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc54608-LPCXpresso/applications/SConscript +++ b/bsp/lpc54608-LPCXpresso/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/lpc824/applications/SConscript b/bsp/lpc824/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/lpc824/applications/SConscript +++ b/bsp/lpc824/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/m16c62p/applications/SConscript b/bsp/m16c62p/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/m16c62p/applications/SConscript +++ b/bsp/m16c62p/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/maxim/max32660-evsys/applications/SConscript b/bsp/maxim/max32660-evsys/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/maxim/max32660-evsys/applications/SConscript +++ b/bsp/maxim/max32660-evsys/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/microchip/samc21/applications/SConscript b/bsp/microchip/samc21/applications/SConscript index e806dae56e..9bb9abae89 100644 --- a/bsp/microchip/samc21/applications/SConscript +++ b/bsp/microchip/samc21/applications/SConscript @@ -1,10 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/microchip/same54/applications/SConscript b/bsp/microchip/same54/applications/SConscript index e806dae56e..9bb9abae89 100644 --- a/bsp/microchip/same54/applications/SConscript +++ b/bsp/microchip/same54/applications/SConscript @@ -1,10 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/microchip/same70/applications/SConscript b/bsp/microchip/same70/applications/SConscript index e806dae56e..9bb9abae89 100644 --- a/bsp/microchip/same70/applications/SConscript +++ b/bsp/microchip/same70/applications/SConscript @@ -1,10 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/microchip/saml10/applications/SConscript b/bsp/microchip/saml10/applications/SConscript index e806dae56e..9bb9abae89 100644 --- a/bsp/microchip/saml10/applications/SConscript +++ b/bsp/microchip/saml10/applications/SConscript @@ -1,10 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/mini2440/applications/SConscript b/bsp/mini2440/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/mini2440/applications/SConscript +++ b/bsp/mini2440/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/mini4020/applications/SConscript b/bsp/mini4020/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/mini4020/applications/SConscript +++ b/bsp/mini4020/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/mm32f103x/applications/SConscript b/bsp/mm32f103x/applications/SConscript index 6452d39145..9bb9abae89 100644 --- a/bsp/mm32f103x/applications/SConscript +++ b/bsp/mm32f103x/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/mm32f327x/applications/SConscript b/bsp/mm32f327x/applications/SConscript index 6452d39145..9bb9abae89 100644 --- a/bsp/mm32f327x/applications/SConscript +++ b/bsp/mm32f327x/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/mm32l07x/applications/SConscript b/bsp/mm32l07x/applications/SConscript index 6452d39145..9bb9abae89 100644 --- a/bsp/mm32l07x/applications/SConscript +++ b/bsp/mm32l07x/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/mm32l3xx/applications/SConscript b/bsp/mm32l3xx/applications/SConscript index 6452d39145..9bb9abae89 100644 --- a/bsp/mm32l3xx/applications/SConscript +++ b/bsp/mm32l3xx/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/n32/n32g45xvl-stb/applications/SConscript b/bsp/n32/n32g45xvl-stb/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/n32/n32g45xvl-stb/applications/SConscript +++ b/bsp/n32/n32g45xvl-stb/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/n32g452xx/n32g452xx-mini-system/applications/SConscript b/bsp/n32g452xx/n32g452xx-mini-system/applications/SConscript index e08e694faf..9bb9abae89 100755 --- a/bsp/n32g452xx/n32g452xx-mini-system/applications/SConscript +++ b/bsp/n32g452xx/n32g452xx-mini-system/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/nrf5x/libraries/templates/nrfx/applications/SConscript b/bsp/nrf5x/libraries/templates/nrfx/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/nrf5x/libraries/templates/nrfx/applications/SConscript +++ b/bsp/nrf5x/libraries/templates/nrfx/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/nrf5x/nrf51822/applications/SConscript b/bsp/nrf5x/nrf51822/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/nrf5x/nrf51822/applications/SConscript +++ b/bsp/nrf5x/nrf51822/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/nrf5x/nrf52832/applications/SConscript b/bsp/nrf5x/nrf52832/applications/SConscript index 644eec02bf..8c116cfa3c 100644 --- a/bsp/nrf5x/nrf52832/applications/SConscript +++ b/bsp/nrf5x/nrf52832/applications/SConscript @@ -1,17 +1,18 @@ from building import * +import os -cwd = GetCurrentDir() - -src = Split(''' -main.c -''') +cwd = GetCurrentDir() +src = ['main.c'] +CPPPATH = [cwd] if GetDepend(['BSP_USING_ON_CHIP_FS']): src += ['mnt.c'] - -CPPPATH = [str(Dir('#')), cwd] - group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') \ No newline at end of file diff --git a/bsp/nrf5x/nrf52833/applications/SConscript b/bsp/nrf5x/nrf52833/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/nrf5x/nrf52833/applications/SConscript +++ b/bsp/nrf5x/nrf52833/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/nrf5x/nrf52840/applications/SConscript b/bsp/nrf5x/nrf52840/applications/SConscript index fc2501998c..9bb9abae89 100644 --- a/bsp/nrf5x/nrf52840/applications/SConscript +++ b/bsp/nrf5x/nrf52840/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') +cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/nuvoton/nk-980iot/applications/SConscript b/bsp/nuvoton/nk-980iot/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/nk-980iot/applications/SConscript +++ b/bsp/nuvoton/nk-980iot/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/nk-n9h30/applications/SConscript b/bsp/nuvoton/nk-n9h30/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/nk-n9h30/applications/SConscript +++ b/bsp/nuvoton/nk-n9h30/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/nk-rtu980/applications/SConscript b/bsp/nuvoton/nk-rtu980/applications/SConscript index 9ffdbcd0f9..9bb9abae89 100644 --- a/bsp/nuvoton/nk-rtu980/applications/SConscript +++ b/bsp/nuvoton/nk-rtu980/applications/SConscript @@ -1,11 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/nuvoton/numaker-iot-m467/applications/SConscript b/bsp/nuvoton/numaker-iot-m467/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/numaker-iot-m467/applications/SConscript +++ b/bsp/nuvoton/numaker-iot-m467/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/numaker-iot-m487/applications/SConscript b/bsp/nuvoton/numaker-iot-m487/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/numaker-iot-m487/applications/SConscript +++ b/bsp/nuvoton/numaker-iot-m487/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/numaker-m032ki/applications/SConscript b/bsp/nuvoton/numaker-m032ki/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/numaker-m032ki/applications/SConscript +++ b/bsp/nuvoton/numaker-m032ki/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/numaker-m2354/applications/SConscript b/bsp/nuvoton/numaker-m2354/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/numaker-m2354/applications/SConscript +++ b/bsp/nuvoton/numaker-m2354/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/numaker-m467hj/applications/SConscript b/bsp/nuvoton/numaker-m467hj/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/numaker-m467hj/applications/SConscript +++ b/bsp/nuvoton/numaker-m467hj/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/nuvoton/numaker-pfm-m487/applications/SConscript b/bsp/nuvoton/numaker-pfm-m487/applications/SConscript index 3769d125df..9bb9abae89 100644 --- a/bsp/nuvoton/numaker-pfm-m487/applications/SConscript +++ b/bsp/nuvoton/numaker-pfm-m487/applications/SConscript @@ -1,21 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() -objs = [] -list = os.listdir(cwd) -for d in list: - path = os.path.join(cwd, d) - if os.path.isfile(os.path.join(path, 'SConscript')): - objs = objs + SConscript(os.path.join(d, 'SConscript')) - -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -objs = objs + group - -Return('objs') +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) +Return('group') diff --git a/bsp/qemu-vexpress-gemini/applications/SConscript b/bsp/qemu-vexpress-gemini/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/qemu-vexpress-gemini/applications/SConscript +++ b/bsp/qemu-vexpress-gemini/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/raspberry-pi/raspi2/applications/SConscript b/bsp/raspberry-pi/raspi2/applications/SConscript index 533df8ac31..9bb9abae89 100644 --- a/bsp/raspberry-pi/raspi2/applications/SConscript +++ b/bsp/raspberry-pi/raspi2/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/raspberry-pi/raspi3-32/applications/SConscript b/bsp/raspberry-pi/raspi3-32/applications/SConscript index 533df8ac31..9bb9abae89 100644 --- a/bsp/raspberry-pi/raspi3-32/applications/SConscript +++ b/bsp/raspberry-pi/raspi3-32/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/raspberry-pi/raspi4-32/applications/SConscript b/bsp/raspberry-pi/raspi4-32/applications/SConscript index 533df8ac31..9bb9abae89 100644 --- a/bsp/raspberry-pi/raspi4-32/applications/SConscript +++ b/bsp/raspberry-pi/raspi4-32/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/raspberry-pi/raspi4-64/applications/SConscript b/bsp/raspberry-pi/raspi4-64/applications/SConscript index 533df8ac31..9bb9abae89 100644 --- a/bsp/raspberry-pi/raspi4-64/applications/SConscript +++ b/bsp/raspberry-pi/raspi4-64/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/rockchip/rk2108/applications/SConscript b/bsp/rockchip/rk2108/applications/SConscript index 533df8ac31..9bb9abae89 100644 --- a/bsp/rockchip/rk2108/applications/SConscript +++ b/bsp/rockchip/rk2108/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/rx/applications/SConscript b/bsp/rx/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/rx/applications/SConscript +++ b/bsp/rx/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/sam7x/applications/SConscript b/bsp/sam7x/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/sam7x/applications/SConscript +++ b/bsp/sam7x/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/samd21/applications/SConscript b/bsp/samd21/applications/SConscript index 7f8f92dd28..9bb9abae89 100644 --- a/bsp/samd21/applications/SConscript +++ b/bsp/samd21/applications/SConscript @@ -1,14 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] - -#remove other no use files -#SrcRemove(src, '*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -Return('group') \ No newline at end of file +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + +Return('group') diff --git a/bsp/stm32/libraries/templates/stm32f0xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32f0xx/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32f0xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32f0xx/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32f10x/applications/SConscript b/bsp/stm32/libraries/templates/stm32f10x/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32f10x/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32f10x/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32f3xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32f3xx/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32f3xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32f3xx/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32f4xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32f4xx/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32f4xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32f4xx/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32f7xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32f7xx/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32f7xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32f7xx/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32h7xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32h7xx/applications/SConscript index 10deb3f896..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32h7xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32h7xx/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -group = DefineGroup('Applications', src, depend = ['']) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/stm32/libraries/templates/stm32l1xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32l1xx/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32l1xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32l1xx/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32l4xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32l4xx/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32l4xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32l4xx/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32l5xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32l5xx/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32l5xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32l5xx/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32mp1xx/applications/SConscript b/bsp/stm32/libraries/templates/stm32mp1xx/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32mp1xx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32mp1xx/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/libraries/templates/stm32wbxx/applications/SConscript b/bsp/stm32/libraries/templates/stm32wbxx/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/libraries/templates/stm32wbxx/applications/SConscript +++ b/bsp/stm32/libraries/templates/stm32wbxx/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f091-st-nucleo/applications/SConscript b/bsp/stm32/stm32f091-st-nucleo/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f091-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f091-st-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f103-atk-nano/applications/SConscript b/bsp/stm32/stm32f103-atk-nano/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f103-atk-nano/applications/SConscript +++ b/bsp/stm32/stm32f103-atk-nano/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f103-dofly-lyc8/applications/SConscript b/bsp/stm32/stm32f103-dofly-lyc8/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f103-dofly-lyc8/applications/SConscript +++ b/bsp/stm32/stm32f103-dofly-lyc8/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f103-fire-arbitrary/applications/SConscript b/bsp/stm32/stm32f103-fire-arbitrary/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/applications/SConscript +++ b/bsp/stm32/stm32f103-fire-arbitrary/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f103-hw100k-ibox/applications/SConscript b/bsp/stm32/stm32f103-hw100k-ibox/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f103-hw100k-ibox/applications/SConscript +++ b/bsp/stm32/stm32f103-hw100k-ibox/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f103-onenet-nbiot/applications/SConscript b/bsp/stm32/stm32f103-onenet-nbiot/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f103-onenet-nbiot/applications/SConscript +++ b/bsp/stm32/stm32f103-onenet-nbiot/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f107-uc-eval/applications/SConscript b/bsp/stm32/stm32f107-uc-eval/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32f107-uc-eval/applications/SConscript +++ b/bsp/stm32/stm32f107-uc-eval/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f302-st-nucleo/applications/SConscript b/bsp/stm32/stm32f302-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f302-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f302-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f405-smdz-breadfruit/applications/SConscript b/bsp/stm32/stm32f405-smdz-breadfruit/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f405-smdz-breadfruit/applications/SConscript +++ b/bsp/stm32/stm32f405-smdz-breadfruit/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f407-armfly-v5/applications/SConscript b/bsp/stm32/stm32f407-armfly-v5/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f407-armfly-v5/applications/SConscript +++ b/bsp/stm32/stm32f407-armfly-v5/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f407-robomaster-c/applications/SConscript b/bsp/stm32/stm32f407-robomaster-c/applications/SConscript index 1381e63e13..9bb9abae89 100644 --- a/bsp/stm32/stm32f407-robomaster-c/applications/SConscript +++ b/bsp/stm32/stm32f407-robomaster-c/applications/SConscript @@ -1,10 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f407-st-discovery/applications/SConscript b/bsp/stm32/stm32f407-st-discovery/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f407-st-discovery/applications/SConscript +++ b/bsp/stm32/stm32f407-st-discovery/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f410-st-nucleo/applications/SConscript b/bsp/stm32/stm32f410-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f410-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f410-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f411-atk-nano/applications/SConscript b/bsp/stm32/stm32f411-atk-nano/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f411-atk-nano/applications/SConscript +++ b/bsp/stm32/stm32f411-atk-nano/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f411-st-nucleo/applications/SConscript b/bsp/stm32/stm32f411-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f411-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f411-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f411-weact-MiniF4/applications/SConscript b/bsp/stm32/stm32f411-weact-MiniF4/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f411-weact-MiniF4/applications/SConscript +++ b/bsp/stm32/stm32f411-weact-MiniF4/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f413-st-nucleo/applications/SConscript b/bsp/stm32/stm32f413-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f413-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f413-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f429-armfly-v6/applications/SConscript b/bsp/stm32/stm32f429-armfly-v6/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f429-armfly-v6/applications/SConscript +++ b/bsp/stm32/stm32f429-armfly-v6/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f429-atk-apollo/applications/SConscript b/bsp/stm32/stm32f429-atk-apollo/applications/SConscript index 2b1cc698c5..ee67c5d498 100644 --- a/bsp/stm32/stm32f429-atk-apollo/applications/SConscript +++ b/bsp/stm32/stm32f429-atk-apollo/applications/SConscript @@ -1,15 +1,18 @@ -import rtconfig from building import * +import os cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +CPPPATH = [cwd] +src = ['main.c'] if GetDepend(['RT_USING_DFS']): src += ['mnt.c'] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f429-fire-challenger/applications/SConscript b/bsp/stm32/stm32f429-fire-challenger/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f429-fire-challenger/applications/SConscript +++ b/bsp/stm32/stm32f429-fire-challenger/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f446-st-nucleo/applications/SConscript b/bsp/stm32/stm32f446-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f446-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f446-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f746-st-disco/applications/SConscript b/bsp/stm32/stm32f746-st-disco/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f746-st-disco/applications/SConscript +++ b/bsp/stm32/stm32f746-st-disco/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f746-st-nucleo/applications/SConscript b/bsp/stm32/stm32f746-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f746-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f746-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f767-atk-apollo/applications/SConscript b/bsp/stm32/stm32f767-atk-apollo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f767-atk-apollo/applications/SConscript +++ b/bsp/stm32/stm32f767-atk-apollo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f767-fire-challenger-v1/applications/SConscript b/bsp/stm32/stm32f767-fire-challenger-v1/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f767-fire-challenger-v1/applications/SConscript +++ b/bsp/stm32/stm32f767-fire-challenger-v1/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f767-st-nucleo/applications/SConscript b/bsp/stm32/stm32f767-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f767-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32f767-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32f769-st-disco/applications/SConscript b/bsp/stm32/stm32f769-st-disco/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32f769-st-disco/applications/SConscript +++ b/bsp/stm32/stm32f769-st-disco/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32g070-st-nucleo/applications/SConscript b/bsp/stm32/stm32g070-st-nucleo/applications/SConscript index e08e694faf..9bb9abae89 100644 --- a/bsp/stm32/stm32g070-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32g070-st-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32g071-st-nucleo/applications/SConscript b/bsp/stm32/stm32g071-st-nucleo/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/stm32/stm32g071-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32g071-st-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32g431-st-nucleo/applications/SConscript b/bsp/stm32/stm32g431-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32g431-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32g431-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32g474-st-nucleo/applications/SConscript b/bsp/stm32/stm32g474-st-nucleo/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32g474-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32g474-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32h743-armfly-v7/applications/SConscript b/bsp/stm32/stm32h743-armfly-v7/applications/SConscript index 10deb3f896..9bb9abae89 100644 --- a/bsp/stm32/stm32h743-armfly-v7/applications/SConscript +++ b/bsp/stm32/stm32h743-armfly-v7/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -group = DefineGroup('Applications', src, depend = ['']) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/stm32/stm32h743-openmv-h7plus/applications/SConscript b/bsp/stm32/stm32h743-openmv-h7plus/applications/SConscript index a868c92232..9bb9abae89 100644 --- a/bsp/stm32/stm32h743-openmv-h7plus/applications/SConscript +++ b/bsp/stm32/stm32h743-openmv-h7plus/applications/SConscript @@ -1,13 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() - -src = Split(''' -main.c -''') - -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32h743-st-nucleo/applications/SConscript b/bsp/stm32/stm32h743-st-nucleo/applications/SConscript index 10deb3f896..9bb9abae89 100644 --- a/bsp/stm32/stm32h743-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32h743-st-nucleo/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -group = DefineGroup('Applications', src, depend = ['']) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/stm32/stm32h747-st-discovery/applications/SConscript b/bsp/stm32/stm32h747-st-discovery/applications/SConscript index 10deb3f896..9bb9abae89 100644 --- a/bsp/stm32/stm32h747-st-discovery/applications/SConscript +++ b/bsp/stm32/stm32h747-st-discovery/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -group = DefineGroup('Applications', src, depend = ['']) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/stm32/stm32h750-armfly-h7-tool/applications/SConscript b/bsp/stm32/stm32h750-armfly-h7-tool/applications/SConscript index 10deb3f896..9bb9abae89 100644 --- a/bsp/stm32/stm32h750-armfly-h7-tool/applications/SConscript +++ b/bsp/stm32/stm32h750-armfly-h7-tool/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] -group = DefineGroup('Applications', src, depend = ['']) +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) + +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/stm32/stm32l010-st-nucleo/applications/SConscript b/bsp/stm32/stm32l010-st-nucleo/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/stm32/stm32l010-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l010-st-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l053-st-nucleo/applications/SConscript b/bsp/stm32/stm32l053-st-nucleo/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/stm32/stm32l053-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l053-st-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l412-st-nucleo/applications/SConscript b/bsp/stm32/stm32l412-st-nucleo/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32l412-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l412-st-nucleo/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l431-BearPi/applications/SConscript b/bsp/stm32/stm32l431-BearPi/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32l431-BearPi/applications/SConscript +++ b/bsp/stm32/stm32l431-BearPi/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l432-st-nucleo/applications/SConscript b/bsp/stm32/stm32l432-st-nucleo/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32l432-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l432-st-nucleo/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l433-ali-startkit/applications/SConscript b/bsp/stm32/stm32l433-ali-startkit/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32l433-ali-startkit/applications/SConscript +++ b/bsp/stm32/stm32l433-ali-startkit/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l433-st-nucleo/applications/SConscript b/bsp/stm32/stm32l433-st-nucleo/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32l433-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l433-st-nucleo/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l496-ali-developer/applications/SConscript b/bsp/stm32/stm32l496-ali-developer/applications/SConscript index 6f66f7ab73..9bb9abae89 100644 --- a/bsp/stm32/stm32l496-ali-developer/applications/SConscript +++ b/bsp/stm32/stm32l496-ali-developer/applications/SConscript @@ -1,12 +1,15 @@ -import rtconfig from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Split(""" -main.c -""") +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l496-st-nucleo/applications/SConscript b/bsp/stm32/stm32l496-st-nucleo/applications/SConscript index a868c92232..9bb9abae89 100644 --- a/bsp/stm32/stm32l496-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l496-st-nucleo/applications/SConscript @@ -1,13 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() - -src = Split(''' -main.c -''') - -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32l552-st-nucleo/applications/SConscript b/bsp/stm32/stm32l552-st-nucleo/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32l552-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32l552-st-nucleo/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32mp157a-st-discovery/applications/SConscript b/bsp/stm32/stm32mp157a-st-discovery/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32mp157a-st-discovery/applications/SConscript +++ b/bsp/stm32/stm32mp157a-st-discovery/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32mp157a-st-ev1/applications/SConscript b/bsp/stm32/stm32mp157a-st-ev1/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/stm32/stm32mp157a-st-ev1/applications/SConscript +++ b/bsp/stm32/stm32mp157a-st-ev1/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32u575-st-nucleo/applications/SConscript b/bsp/stm32/stm32u575-st-nucleo/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32u575-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32u575-st-nucleo/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32wb55-st-nucleo/applications/SConscript b/bsp/stm32/stm32wb55-st-nucleo/applications/SConscript index 4939638d41..9bb9abae89 100644 --- a/bsp/stm32/stm32wb55-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32wb55-st-nucleo/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [str(Dir('#')), cwd] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32wl55-st-nucleo/applications/SConscript b/bsp/stm32/stm32wl55-st-nucleo/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/stm32/stm32wl55-st-nucleo/applications/SConscript +++ b/bsp/stm32/stm32wl55-st-nucleo/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32wle5-yizhilian-lm401/applications/SConscript b/bsp/stm32/stm32wle5-yizhilian-lm401/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/stm32/stm32wle5-yizhilian-lm401/applications/SConscript +++ b/bsp/stm32/stm32wle5-yizhilian-lm401/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/stm32/stm32wle5-yizhilian-lm402/applications/SConscript b/bsp/stm32/stm32wle5-yizhilian-lm402/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/stm32/stm32wle5-yizhilian-lm402/applications/SConscript +++ b/bsp/stm32/stm32wle5-yizhilian-lm402/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/synopsys/boards/applications/SConscript b/bsp/synopsys/boards/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/synopsys/boards/applications/SConscript +++ b/bsp/synopsys/boards/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/taihu/applications/SConscript b/bsp/taihu/applications/SConscript index 0e743b599a..9bb9abae89 100644 --- a/bsp/taihu/applications/SConscript +++ b/bsp/taihu/applications/SConscript @@ -1,11 +1,15 @@ -# RT-Thread building script for component - from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/tm4c123bsp/applications/SConscript b/bsp/tm4c123bsp/applications/SConscript index 04f04dd543..9bb9abae89 100644 --- a/bsp/tm4c123bsp/applications/SConscript +++ b/bsp/tm4c123bsp/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/tm4c129x/applications/SConscript b/bsp/tm4c129x/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/tm4c129x/applications/SConscript +++ b/bsp/tm4c129x/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/upd70f3454/applications/SConscript b/bsp/upd70f3454/applications/SConscript index 4ccb177207..9bb9abae89 100644 --- a/bsp/upd70f3454/applications/SConscript +++ b/bsp/upd70f3454/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/arm/ch32f103c8-core/applications/SConscript b/bsp/wch/arm/ch32f103c8-core/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/arm/ch32f103c8-core/applications/SConscript +++ b/bsp/wch/arm/ch32f103c8-core/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/arm/ch32f203r-evt/applications/SConscript b/bsp/wch/arm/ch32f203r-evt/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/arm/ch32f203r-evt/applications/SConscript +++ b/bsp/wch/arm/ch32f203r-evt/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/arm/ch579m/applications/SConscript b/bsp/wch/arm/ch579m/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/arm/ch579m/applications/SConscript +++ b/bsp/wch/arm/ch579m/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript b/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript index 61a0bd61dd..9bb9abae89 100644 --- a/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript +++ b/bsp/wch/risc-v/ch32v103r-evt/applications/SConscript @@ -1,17 +1,15 @@ -# RT-Thread building script for component -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os cwd = GetCurrentDir() - -# add the general drivers. -src = Split(""" -main.c -""") - -CPPPATH = [cwd, str(Dir('#'))] +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/wch/risc-v/ch569w-evt/applications/SConscript b/bsp/wch/risc-v/ch569w-evt/applications/SConscript index f99a1b878d..496584a1ae 100644 --- a/bsp/wch/risc-v/ch569w-evt/applications/SConscript +++ b/bsp/wch/risc-v/ch569w-evt/applications/SConscript @@ -1,15 +1,15 @@ from building import * +import os cwd = GetCurrentDir() +src = ['main.c'] +CPPPATH = [cwd] -app = ARGUMENTS.get('app', "main") +group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) -src = Split(""" -{}.c -""".format(app)) - -path = [cwd, str(Dir('#'))] - -group = DefineGroup('Applications', src, depend=[''], CPPPATH=path) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) Return('group') diff --git a/bsp/x86/applications/SConscript b/bsp/x86/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/x86/applications/SConscript +++ b/bsp/x86/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/xplorer4330/applications/SConscript b/bsp/xplorer4330/applications/SConscript index 01eb940dfb..9bb9abae89 100644 --- a/bsp/xplorer4330/applications/SConscript +++ b/bsp/xplorer4330/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/yichip/yc3121-pos/applications/SConscript b/bsp/yichip/yc3121-pos/applications/SConscript index 6452d39145..9bb9abae89 100644 --- a/bsp/yichip/yc3121-pos/applications/SConscript +++ b/bsp/yichip/yc3121-pos/applications/SConscript @@ -1,9 +1,15 @@ from building import * +import os -cwd = GetCurrentDir() -CPPPATH = [cwd, str(Dir('#'))] -src = Glob('*.c') +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group') diff --git a/bsp/zynqmp-r5-axu4ev/applications/SConscript b/bsp/zynqmp-r5-axu4ev/applications/SConscript index 02d700cc50..9bb9abae89 100644 --- a/bsp/zynqmp-r5-axu4ev/applications/SConscript +++ b/bsp/zynqmp-r5-axu4ev/applications/SConscript @@ -1,11 +1,15 @@ -Import('RTT_ROOT') -Import('rtconfig') from building import * +import os -cwd = os.path.join(str(Dir('#')), 'applications') -src = Glob('*.c') -CPPPATH = [cwd, str(Dir('#'))] +cwd = GetCurrentDir() +src = Glob('*.c') +CPPPATH = [cwd] group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH) +list = os.listdir(cwd) +for item in list: + if os.path.isfile(os.path.join(cwd, item, 'SConscript')): + group = group + SConscript(os.path.join(item, 'SConscript')) + Return('group')