mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-16 01:05:15 +08:00
29 lines
717 B
Python
29 lines
717 B
Python
Import('RTT_ROOT')
|
|
from building import *
|
|
import os
|
|
|
|
cwd = GetCurrentDir()
|
|
src = Split("""
|
|
dev_i2c_core.c
|
|
dev_i2c_dev.c
|
|
""")
|
|
|
|
if GetDepend('RT_USING_I2C_BITOPS'):
|
|
src = src + ['dev_i2c_bit_ops.c']
|
|
if GetDepend('RT_USING_SOFT_I2C'):
|
|
src = src + ['dev_soft_i2c.c']
|
|
if GetDepend(['RT_USING_DM']):
|
|
src += ['dev_i2c_bus.c', 'dev_i2c_dm.c']
|
|
|
|
# The set of source files associated with this SConscript file.
|
|
path = [cwd + '/../include']
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend = ['RT_USING_I2C'], 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')
|