forked from artinchip/luban-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript
56 lines (48 loc) · 1.48 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Import('AIC_ROOT')
Import('PRJ_CHIP')
Import('PRJ_BOARD')
Import('PRJ_KERNEL')
Import('PRJ_APP')
import os
from building import *
objs = []
# chip
rel_path = os.path.join('bsp/artinchip/sys/' + PRJ_CHIP, 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
# board
rel_path = os.path.join('target/' + PRJ_CHIP, PRJ_BOARD, 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
# kernel/xxx
rel_path = os.path.join('kernel', PRJ_KERNEL, 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
# kernel/common
rel_path = os.path.join('kernel', 'common', 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
# bsp
rel_path = os.path.join('bsp', 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
# packages
rel_path = os.path.join('packages', 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
# app
if PRJ_KERNEL == 'baremetal':
app_os = 'baremetal'
else:
app_os = 'os'
rel_path = os.path.join('application', app_os, PRJ_APP, 'SConscript')
abs_path = os.path.join(AIC_ROOT, rel_path)
if os.path.isfile(abs_path):
objs = objs + SConscript(rel_path)
Return('objs')