summaryrefslogtreecommitdiff
path: root/libcpu/SConscript
blob: bd854aa5f7ac1c59cdbe4f660a96dbfd046e2763 (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
33
34
Import('env')
Import('rtconfig')
Import('RTT_ROOT')
Import('projects')

comm = rtconfig.ARCH + '/common'
path = rtconfig.ARCH + '/' + rtconfig.CPU

# The set of source files associated with this SConscript file.
if rtconfig.PLATFORM == 'armcc':
	src_local = Glob(path + '/*.c') + Glob(path + '/*_rvds.S') + Glob(comm + '/*.c')

if rtconfig.PLATFORM == 'gcc':
	src_local = Glob(path + '/*.c') + Glob(path + '/*_gcc.S') + Glob(comm + '/*.c') + Glob(path + '/*_init.S')

if rtconfig.PLATFORM == 'iar':
	src_local = Glob(path + '/*.c') + Glob(path + '/*_iar.S') + Glob(comm + '/*.c')

# group definitions
group = {}
group['name'] = rtconfig.CPU.upper()
group['src'] = File(src_local)
group['CCFLAGS'] = ''
group['CPPPATH'] = [RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + rtconfig.ARCH + '/common']
group['CPPDEFINES'] = ''
group['LINKFLAGS'] = ''

# add group to project list
projects.append(group)

env.Append(CPPPATH = group['CPPPATH'])
obj = env.Object(group['src'])

Return('obj')