SConscript 673 B

123456789101112131415161718192021
  1. Import("env")
  2. env.NanopbProto("doublemsg")
  3. # Define the compilation options
  4. opts = env.Clone()
  5. opts.Append(CPPDEFINES = {'PB_CONVERT_DOUBLE_FLOAT': 1})
  6. if opts.get('EMBEDDED') == 'AVR':
  7. opts.Append(CFLAGS = "-Wno-overflow")
  8. # Build new version of core
  9. strict = opts.Clone()
  10. strict.Append(CFLAGS = strict['CORECFLAGS'])
  11. strict.Object("pb_decode_fldbl.o", "$NANOPB/pb_decode.c")
  12. strict.Object("pb_encode_fldbl.o", "$NANOPB/pb_encode.c")
  13. strict.Object("pb_common_fldbl.o", "$NANOPB/pb_common.c")
  14. # Build and run test
  15. test = opts.Program(["float_double_conversion.c", "doublemsg.pb.c", "pb_encode_fldbl.o", "pb_decode_fldbl.o", "pb_common_fldbl.o"])
  16. env.RunTest(test)