summaryrefslogtreecommitdiff
path: root/libcpu/SConscript
blob: 568da67cc97929311bd5b5465fe89616444a7f95 (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
35
36
37
38
Import('RTT_ROOT')
Import('rtconfig')
from building import *

arch = rtconfig.ARCH
comm = rtconfig.ARCH + '/common'
path = rtconfig.ARCH + '/' + rtconfig.CPU
src  = []
ASFLAGS = ''

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

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

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

if rtconfig.PLATFORM == 'cl':
    src = Glob(path + '/*.c')

if rtconfig.PLATFORM == 'mingw':
    src = Glob(path + '/*.c')

if rtconfig.PLATFORM == 'armcc' and rtconfig.ARCH == 'arm' and rtconfig.CPU == 'arm926':
    ASFLAGS = ' --cpreproc'

CPPPATH = [RTT_ROOT + '/libcpu/' + arch + '/' + rtconfig.CPU, RTT_ROOT + '/libcpu/' + arch + '/common']

group = DefineGroup(rtconfig.CPU.upper(), src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS)

Return('group')