Repository navigation
Expand file tree
/
Copy pathSConscript
More file actions
43 lines (39 loc) · 1.82 KB
/
Copy pathSConscript
File metadata and controls
43 lines (39 loc) · 1.82 KB
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
from building import *
cwd = GetCurrentDir()
src = []
path = []
# A single top-level Kconfig choice selects exactly one independent code path.
if GetDepend(['INFRARED_LEGACY']):
src = ['src/infrared.c']
if GetDepend(['INFRARED_NEC_DECODER']):
src += ['src/nec_decoder.c']
if GetDepend(['PKG_USING_DRV_INFRARED']):
src += ['src/drv_infrared.c']
path = [cwd + '/inc', cwd + '/src']
elif GetDepend(['INFRARED_FRAMEWORK']):
src = ['framework/src/infrared_device.c', 'framework/src/infrared_callback.c']
if GetDepend(['INFRARED_DEVICE_PIN']):
src += ['framework/src/backends/input/infrared_pin.c']
if GetDepend(['INFRARED_USING_INPUT_CAPTURE']):
src += ['framework/src/backends/input/infrared_capture.c']
if GetDepend(['INFRARED_DEVICE_PWM']):
src += ['framework/src/backends/output/infrared_pwm.c']
if GetDepend(['INFRARED_USING_PULSE_DISTANCE']):
src += ['framework/codecs/pulse_distance/pulse_distance.c']
if GetDepend(['INFRARED_FRAMEWORK_NEC_CODEC']):
src += ['framework/codecs/nec/nec_codec.c']
if GetDepend(['INFRARED_USING_EXAMPLE']):
src += ['framework/examples/infrared_example.c']
if GetDepend(['INFRARED_USING_MSH']):
src += ['framework/examples/infrared_msh.c']
if GetDepend(['INFRARED_FRAMEWORK_NEC_CODEC']):
src += ['framework/codecs/nec/nec_msh.c']
path = [cwd + '/framework/inc', cwd + '/framework/src',
cwd + '/framework/src/backends/input',
cwd + '/framework/src/backends/output',
cwd + '/framework/codecs/nec',
cwd + '/framework/codecs/pulse_distance']
if GetDepend(['INFRARED_USING_EXAMPLE']):
path += [cwd + '/framework/examples']
group = DefineGroup('Infrared_frame', src, depend=['PKG_USING_INFRARED'], CPPPATH=path)
Return('group')