cmvr_head/packages/SConscript
2025-12-30 15:44:41 +08:00

38 lines
728 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import os
from building import *
objs = []
cwd = GetCurrentDir()
# 黑名单(exact)
exclude_dirs = {
'cmsis-core-latest',
'stm32h7_cmsis_driver-latest',
'stm32h7_hal_driver-latest',
}
#黑名单(prefix)
exclude_prefixes = (
'cmsis-core-',
'stm32h7_cmsis_driver-',
'stm32h7_hal_driver-',
)
for item in os.listdir(cwd):
item_path = os.path.join(cwd, item)
if not os.path.isdir(item_path):
continue
name = item.lower()
if name in exclude_dirs or name.startswith(exclude_prefixes):
print('[scons] skip dir:', item)
continue
scon = os.path.join(item_path, 'SConscript')
if os.path.isfile(scon):
objs += SConscript(scon)
Return('objs')