forked from plctlab/mlibc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSConscript
28 lines (22 loc) · 802 Bytes
/
SConscript
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
from building import *
import os
Import('rtconfig')
cwd = GetCurrentDir()
src = Glob('src/*.c')
objs = []
list = os.listdir(cwd)
CPPPATH = [cwd + '/include']
CPPPATH += [cwd + '/src/internal']
CPPDEFINES = ['RT_USING_MLIBC', 'RT_USING_LIBC']
LIBS = ['gcc']
CCFLAGS = ""
LINKFLAGS = " -nostartfiles -nostdlib -nostdinc -lgcc "
if GetDepend('PKG_USING_MLIBC'):
AddDepend(['RT_USING_MLIBC', 'RT_USING_LIBC'])
group = DefineGroup('Compiler', src, depend = ['PKG_USING_MLIBC'], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS, CPPDEFINES = CPPDEFINES, LIBS = LIBS, CCFLAGS=CCFLAGS)
objs += group
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
Return('objs')