summaryrefslogtreecommitdiff
path: root/components/dfs/dfs_v1/SConscript
blob: 42f8b95e31e792ec9e8f48ead0d6a30e8b3dfc5a (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
from building import *
from gcc import *
import rtconfig
import os

# The set of source files associated with this SConscript file.
src     = []
cwd     = GetCurrentDir()
CPPPATH = [cwd + "/include"]
group   = []
LOCAL_CFLAGS = ''

if GetDepend('RT_USING_DFS') and not GetDepend('RT_USING_DFS_V2'):
    src = ['src/dfs.c', 'src/dfs_file.c', 'src/dfs_fs.c']

    if GetDepend('DFS_USING_POSIX'):
        src += ['src/dfs_posix.c']

    if rtconfig.PLATFORM in GetGCCLikePLATFORM():
        LOCAL_CFLAGS += ' -std=c99'
    elif rtconfig.PLATFORM in ['armcc']:
        LOCAL_CFLAGS += ' --c99'

    group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS'], CPPPATH = CPPPATH, LOCAL_CFLAGS = LOCAL_CFLAGS)

    # search in the file system implementation
    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')