X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=extra%2Fnanopb.mk;h=5c2cff560c5df5210b96d983085b06d6a3c5e86f;hb=5497a1dfc91a86965383cdd1652e348345400435;hp=296f98e2ec504541fbadf2551e02bc8abc44b501;hpb=d344bda28ae7a1a590790e1346a73a5d159ce7dd;p=apps%2Fagl-service-can-low-level.git diff --git a/extra/nanopb.mk b/extra/nanopb.mk index 296f98e2..5c2cff56 100644 --- a/extra/nanopb.mk +++ b/extra/nanopb.mk @@ -5,7 +5,15 @@ NANOPB_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../) # Files for the nanopb core -NANOPB_CORE = $(NANOPB_DIR)/pb_encode.c $(NANOPB_DIR)/pb_decode.c +NANOPB_CORE = $(NANOPB_DIR)/pb_encode.c $(NANOPB_DIR)/pb_decode.c $(NANOPB_DIR)/pb_common.c + +# Check if we are running on Windows +ifdef windir +WINDOWS = 1 +endif +ifdef WINDIR +WINDOWS = 1 +endif # Check whether to use binary version of nanopb_generator or the # system-supplied python interpreter. @@ -16,7 +24,7 @@ ifneq "$(wildcard $(NANOPB_DIR)/generator-bin)" "" else # Source only or git checkout PROTOC = protoc - ifdef windir + ifdef WINDOWS PROTOC_OPTS = --plugin=protoc-gen-nanopb=$(NANOPB_DIR)/generator/protoc-gen-nanopb.bat else PROTOC_OPTS = --plugin=protoc-gen-nanopb=$(NANOPB_DIR)/generator/protoc-gen-nanopb