File: SConscript

package info (click to toggle)
nanopb 0.4.9.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,676 kB
  • sloc: ansic: 12,144; python: 2,795; cpp: 190; sh: 163; makefile: 85
file content (21 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Import("env")

env.NanopbProto("doublemsg")

# Define the compilation options
opts = env.Clone()
opts.Append(CPPDEFINES = {'PB_CONVERT_DOUBLE_FLOAT': 1})

if opts.get('EMBEDDED') == 'AVR':
    opts.Append(CFLAGS = "-Wno-overflow")

# Build new version of core
strict = opts.Clone()
strict.Append(CFLAGS = strict['CORECFLAGS'])
strict.Object("pb_decode_fldbl.o", "$NANOPB/pb_decode.c")
strict.Object("pb_encode_fldbl.o", "$NANOPB/pb_encode.c")
strict.Object("pb_common_fldbl.o", "$NANOPB/pb_common.c")

# Build and run test
test = opts.Program(["float_double_conversion.c", "doublemsg.pb.c", "pb_encode_fldbl.o", "pb_decode_fldbl.o", "pb_common_fldbl.o"])
env.RunTest(test)