summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-11-20 12:19:30 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-11-20 12:19:30 +0100
commitc225a738fc6ce90d167c98a131f999a8f629a0e1 (patch)
tree54c1a90a891f12fb42692426e6851106af230d07
parent0a4a3e085f162fb3d34da3522bca7e7eeb8847e9 (diff)
move nanopb generated files to nanopbbench.pb.*
-rw-r--r--src/app/prototest/Makefile.inc9
-rw-r--r--src/app/prototest/main.cc2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/app/prototest/Makefile.inc b/src/app/prototest/Makefile.inc
index 00c576c..a3477e6 100644
--- a/src/app/prototest/Makefile.inc
+++ b/src/app/prototest/Makefile.inc
@@ -34,7 +34,7 @@ endif
ifeq (${prototest_nanopb}, 1)
COMMON_FLAGS += -DPROTOTEST_NANOPB
- CXX_TARGETS += src/app/prototest/nanopb.pb.cc src/lib/nanopb/pb_common.cc
+ CXX_TARGETS += src/app/prototest/nanopbbench.pb.cc src/lib/nanopb/pb_common.cc
CXX_TARGETS += src/lib/nanopb/pb_decode.cc src/lib/nanopb/pb_encode.cc
INCLUDES += -Iinclude/lib/nanopb
endif
@@ -51,6 +51,7 @@ ifeq (${prototest_xdr}, 1)
endif
%.pb.cc: %.proto
- protoc --plugin=protoc-gen-nanopb=${HOME}/var/ess/protocol-modeling/nanopb/generator/protoc-gen-nanopb --nanopb_out=. src/app/prototest/nanopb.proto
- mv src/app/prototest/nanopb.pb.c src/app/prototest/nanopb.pb.cc
- sed -i 's!src/app/prototest/!!' src/app/prototest/nanopb.pb.cc
+ protoc --plugin=protoc-gen-nanopb=${HOME}/var/ess/protocol-modeling/nanopb/generator/protoc-gen-nanopb --nanopb_out=. src/app/prototest/nanopbbench.proto
+ mv src/app/prototest/nanopbbench.pb.c src/app/prototest/nanopbbench.pb.cc
+ sed -i 's!src/app/prototest/!!' src/app/prototest/nanopbbench.pb.cc
+ sed -i 's!\#include "src/app/prototest/nanopb.pb.h"!!' src/app/prototest/nanopbbench.pb.h
diff --git a/src/app/prototest/main.cc b/src/app/prototest/main.cc
index 0b5e5d3..b4d2254 100644
--- a/src/app/prototest/main.cc
+++ b/src/app/prototest/main.cc
@@ -14,7 +14,7 @@
#endif
#ifdef PROTOTEST_NANOPB
#include <pb.h>
-#include "nanopb.pb.h"
+#include "nanopbbench.pb.h"
#include <pb_encode.h>
#include <pb_decode.h>
#endif