forked from openwsn-berkeley/openwsn-fw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript
70 lines (59 loc) · 1.86 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import os
Import('env')
localEnv = env.Clone()
target = 'libopenweb'
sources_c = [
"openweb.c",
# ==== opencoap
os.path.join("opencoap", "cborencoder.c"),
os.path.join("opencoap", "coap.c"),
os.path.join("opencoap", "oscore.c"),
]
sources_h = [
"openweb.h",
# ==== opencoap
os.path.join("opencoap", "cborencoder.h"),
os.path.join("opencoap", "coap.h"),
os.path.join("opencoap", "oscore.h"),
]
if localEnv['board']=='python':
for s in sources_c+sources_h:
temp = localEnv.Objectify(
target = localEnv.ObjectifiedFilename(s),
source = s,
)
#localEnv.AlwaysBuild(temp)
libopenweb = localEnv.Library(
target = target,
source = [localEnv.ObjectifiedFilename(s) for s in sources_c],
)
localEnv.Depends(libopenweb, [localEnv.ObjectifiedFilename(s) for s in sources_h])
else:
localEnv.Append(
CPPPATH = [
# inc
os.path.join('#','inc'),
# kernel
os.path.join('#','kernel'),
# drivers
os.path.join('#','drivers','common'),
os.path.join('#','drivers','common','crypto'),
# openstack
os.path.join('#','openstack'),
os.path.join('#','openstack','02a-MAClow'),
os.path.join('#','openstack','02b-MAChigh'),
os.path.join('#','openstack','03a-IPHC'),
os.path.join('#','openstack','03b-IPv6'),
os.path.join('#','openstack','04-TRAN'),
os.path.join('#','openstack','04-TRAN','sock'),
os.path.join('#','openstack','cross-layers'),
# openapps
os.path.join('#','openweb'),
os.path.join('#','openweb','opencoap'),
],
)
libopenweb = localEnv.Library(
target = target,
source = sources_c,
)
Alias('libopenweb', libopenweb)