38 lines
728 B
Python
38 lines
728 B
Python
|
|
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')
|