File: SConscript.target.arduino

package info (click to toggle)
alljoyn-thin-client-1509 15.09a-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,240 kB
  • sloc: ansic: 55,937; cpp: 2,995; python: 361; sh: 174; makefile: 39
file content (72 lines) | stat: -rw-r--r-- 2,074 bytes parent folder | download | duplicates (4)
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
71
72
Import('env')

# Arduino does not build binaries; just sets up for inclusion in Arduino IDE
env['build'] = False

arduinoLibDir = '#dist/arduino_due/libraries/AllJoyn/'

# Install the .c files as .cpp files for the Arduino IDE to consume.
srcs = [
    Glob('src/*.c'),
    Glob('src/target/$TARG/*.c'),
    Glob('src/crypto/*.c'),
    Glob('external/sha2/*.c')
]
env.InstallAs([ File(arduinoLibDir + f.name.replace('.c' , '.cpp')) for f in srcs ], srcs)

# Install the related header files as well.
hdrs = [
    Glob('inc/ajtcl/*.h'),
    Glob('src/*.h'),
    Glob('src/target/$TARG/*.h'),
    Glob('src/crypto/*.h'),
    Glob('external/sha2/*.h')
]
env.Install(arduinoLibDir + 'ajtcl', hdrs)

# Install the Arduino specific examples into their source
env.Install(Dir(arduinoLibDir).abspath, Dir('src/target/arduino/examples/'))


# Install the generic .c sample and test programs from the sample and
# test directories into their destination while changing the
# extension.

# Install the test programs
tests = [
    'svclite',
    'clientlite',
    'siglite',
    'bastress2',
    'mutter',
    'sessions',
    'aestest'
]
for test in tests:
    tdir = arduinoLibDir + 'tests/AJ_' + test
    env.Install(tdir, 'src/target/arduino/tests/AJ_' + test + '/AJ_' + test + '.ino')
    env.InstallAs(tdir + '/' + test + '.cpp', 'test/' + test + '.c')


# Install basic samples
basicsamples = [
    'basic_service',
    'basic_client',
    'signal_service',
    'signalConsumer_client'
]
for sample in basicsamples:
    sdir = arduinoLibDir + 'samples/AJ_' + sample
    env.Install(sdir, 'src/target/arduino/samples/AJ_' + sample + '/AJ_' + sample + '.ino')
    env.InstallAs(sdir + '/' + sample + '.cpp', 'samples/basic/' + sample + '.c')


# Install secure samples
securesamples = [
    'SecureClient',
    'SecureService'
]
for sample in securesamples:
    sdir = arduinoLibDir + 'samples/AJ_' + sample
    env.Install(sdir, 'src/target/arduino/samples/AJ_' + sample + '/AJ_' + sample + '.ino')
    env.InstallAs(sdir + '/' + sample + '.cpp', 'samples/secure/' + sample + '.c')