1from building import *
2
3objs = []
4
5if not GetDepend(['RT_USING_PCI']):
6    Return('objs')
7
8cwd     = GetCurrentDir()
9list    = os.listdir(cwd)
10CPPPATH = [cwd + '/../include']
11
12src = ['access.c', 'host-bridge.c', 'irq.c', 'pci.c', 'pme.c', 'probe.c']
13
14if GetDepend(['RT_USING_OFW']):
15    src += ['ofw.c']
16
17if GetDepend(['RT_USING_DFS_PROCFS']):
18    src += ['procfs.c']
19
20if GetDepend(['RT_PCI_ECAM']):
21    src += ['ecam.c']
22
23group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
24
25for d in list:
26    path = os.path.join(cwd, d)
27    if os.path.isfile(os.path.join(path, 'SConscript')):
28        objs = objs + SConscript(os.path.join(d, 'SConscript'))
29objs = objs + group
30
31Return('objs')
32