Add pb_common.c to examples
This commit is contained in:
@@ -10,6 +10,7 @@ CSRC = simple.c # The main program
|
|||||||
CSRC += simple.pb.c # The compiled protocol definition
|
CSRC += simple.pb.c # The compiled protocol definition
|
||||||
CSRC += $(NANOPB_DIR)/pb_encode.c # The nanopb encoder
|
CSRC += $(NANOPB_DIR)/pb_encode.c # The nanopb encoder
|
||||||
CSRC += $(NANOPB_DIR)/pb_decode.c # The nanopb decoder
|
CSRC += $(NANOPB_DIR)/pb_decode.c # The nanopb decoder
|
||||||
|
CSRC += $(NANOPB_DIR)/pb_common.c # The nanopb common parts
|
||||||
|
|
||||||
# Build rule for the main program
|
# Build rule for the main program
|
||||||
simple: $(CSRC)
|
simple: $(CSRC)
|
||||||
|
|||||||
@@ -182,8 +182,8 @@ mark_as_advanced(NANOPB_INCLUDE_DIRS)
|
|||||||
# Find nanopb source files
|
# Find nanopb source files
|
||||||
set(NANOPB_SRCS)
|
set(NANOPB_SRCS)
|
||||||
set(NANOPB_HDRS)
|
set(NANOPB_HDRS)
|
||||||
list(APPEND _nanopb_srcs pb_decode.c pb_encode.c)
|
list(APPEND _nanopb_srcs pb_decode.c pb_encode.c pb_common.c)
|
||||||
list(APPEND _nanopb_hdrs pb_decode.h pb_encode.h pb.h)
|
list(APPEND _nanopb_hdrs pb_decode.h pb_encode.h pb_common.h pb.h)
|
||||||
|
|
||||||
foreach(FIL ${_nanopb_srcs})
|
foreach(FIL ${_nanopb_srcs})
|
||||||
find_file(${FIL}__nano_pb_file NAMES ${FIL} PATHS ${NANOPB_SRC_ROOT_FOLDER} ${NANOPB_INCLUDE_DIRS})
|
find_file(${FIL}__nano_pb_file NAMES ${FIL} PATHS ${NANOPB_SRC_ROOT_FOLDER} ${NANOPB_INCLUDE_DIRS})
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
NANOPB_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../)
|
NANOPB_DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))../)
|
||||||
|
|
||||||
# Files for the nanopb core
|
# 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
|
# Check if we are running on Windows
|
||||||
ifdef windir
|
ifdef windir
|
||||||
|
|||||||
Reference in New Issue
Block a user