summaryrefslogtreecommitdiff
path: root/components/drivers/hwtimer/SConscript
diff options
context:
space:
mode:
authorzms123456 <[email protected]>2024-02-29 22:27:38 +0800
committerGitHub <[email protected]>2024-02-29 22:27:38 +0800
commit6b5058ba5c084f14846fd127e33552c0d44916b9 (patch)
tree55bf99ee7d41bf9afcfbe69324b5b6d5ed659bce /components/drivers/hwtimer/SConscript
parent97c5edf947b0c1b02ad39fd5bedb1853a9140c2d (diff)
[components/drivers]update hwtimer (#8565)
Diffstat (limited to 'components/drivers/hwtimer/SConscript')
-rw-r--r--components/drivers/hwtimer/SConscript16
1 files changed, 13 insertions, 3 deletions
diff --git a/components/drivers/hwtimer/SConscript b/components/drivers/hwtimer/SConscript
index 534e04b6c0..b6ffc580ed 100644
--- a/components/drivers/hwtimer/SConscript
+++ b/components/drivers/hwtimer/SConscript
@@ -1,8 +1,18 @@
from building import *
-cwd = GetCurrentDir()
-src = Glob('*.c')
+group = []
+
+if not GetDepend(['RT_USING_HWTIMER']):
+ Return('group')
+
+cwd = GetCurrentDir()
CPPPATH = [cwd + '/../include']
-group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_HWTIMER'], CPPPATH = CPPPATH)
+
+src = ['hwtimer.c']
+
+if GetDepend(['RT_HWTIMER_ARM_ARCH']):
+ src += ['hwtimer-arm_arch.c']
+
+group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')