From 0495612ac7975a15fe8b4cfa67b4abc52d21cd69 Mon Sep 17 00:00:00 2001 From: zhujiale <945386260@qq.com> Date: Mon, 30 Sep 2024 10:35:36 +0800 Subject: [PATCH] phy --- components/drivers/phy/SConscript | 4 +++- components/{net/ofw => drivers/phy}/ofw.c | 0 components/{net/ofw => drivers/phy}/ofw.h | 0 components/net/ofw/SConscript | 10 ---------- 4 files changed, 3 insertions(+), 11 deletions(-) rename components/{net/ofw => drivers/phy}/ofw.c (100%) rename components/{net/ofw => drivers/phy}/ofw.h (100%) delete mode 100644 components/net/ofw/SConscript diff --git a/components/drivers/phy/SConscript b/components/drivers/phy/SConscript index 5b6effc98ab5..ec59a7aff676 100644 --- a/components/drivers/phy/SConscript +++ b/components/drivers/phy/SConscript @@ -2,7 +2,9 @@ from building import * cwd = GetCurrentDir() src = Glob('*.c') -CPPPATH = [cwd + '/../include'] +if GetDepend('RT_USING_OFW') == False: + SrcRemove(src, ['ofw.c']) +CPPPATH = [cwd,cwd + '/../include'] group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_PHY'], CPPPATH = CPPPATH) Return('group') diff --git a/components/net/ofw/ofw.c b/components/drivers/phy/ofw.c similarity index 100% rename from components/net/ofw/ofw.c rename to components/drivers/phy/ofw.c diff --git a/components/net/ofw/ofw.h b/components/drivers/phy/ofw.h similarity index 100% rename from components/net/ofw/ofw.h rename to components/drivers/phy/ofw.h diff --git a/components/net/ofw/SConscript b/components/net/ofw/SConscript deleted file mode 100644 index 6142f31ab36e..000000000000 --- a/components/net/ofw/SConscript +++ /dev/null @@ -1,10 +0,0 @@ -from building import * - -cwd = GetCurrentDir() -src = Glob('*.c') - -CPPPATH = [cwd] - -group = DefineGroup('ofw', src, depend = ['RT_USING_OFW'], CPPPATH = CPPPATH) - -Return('group')