summaryrefslogtreecommitdiff
path: root/components/drivers/serial/SConscript
blob: d0b5fb0635c51a12fef728baf7b6be31bac42571 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from building import *

cwd = GetCurrentDir()
CPPPATH = [cwd + '/../include']
group = []
src = []

if not GetDepend(['RT_USING_SERIAL']):
    Return('group')

if GetDepend(['RT_USING_SMART']):
    src += Glob('serial_tty.c')

if GetDepend(['RT_USING_SERIAL_V2']):
    src += ['dev_serial_v2.c']
else:
    src += ['dev_serial.c']

if GetDepend(['RT_USING_SERIAL_BYPASS']):
    src += ['bypass.c']

if GetDepend(['RT_USING_DM']):
    src += ['serial_dm.c']

group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)

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')