Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nanopb
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
le
nanopb
Commits
8a95311b
Commit
8a95311b
authored
10 years ago
by
Petteri Aimonen
Browse files
Options
Downloads
Patches
Plain Diff
Add pb_common.c to examples
parent
3ed21938
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/simple/Makefile
+1
-0
1 addition, 0 deletions
examples/simple/Makefile
extra/FindNanopb.cmake
+2
-2
2 additions, 2 deletions
extra/FindNanopb.cmake
extra/nanopb.mk
+1
-1
1 addition, 1 deletion
extra/nanopb.mk
with
4 additions
and
3 deletions
examples/simple/Makefile
+
1
−
0
View file @
8a95311b
...
...
@@ -10,6 +10,7 @@ CSRC = simple.c # The main program
CSRC
+=
simple.pb.c
# The compiled protocol definition
CSRC
+=
$(
NANOPB_DIR
)
/pb_encode.c
# The nanopb encoder
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
simple
:
$(CSRC)
...
...
This diff is collapsed.
Click to expand it.
extra/FindNanopb.cmake
+
2
−
2
View file @
8a95311b
...
...
@@ -182,8 +182,8 @@ mark_as_advanced(NANOPB_INCLUDE_DIRS)
# Find nanopb source files
set
(
NANOPB_SRCS
)
set
(
NANOPB_HDRS
)
list
(
APPEND _nanopb_srcs pb_decode.c pb_encode.c
)
list
(
APPEND _nanopb_hdrs pb_decode.h pb_encode.h pb.h
)
list
(
APPEND _nanopb_srcs pb_decode.c pb_encode.c
pb_common.c
)
list
(
APPEND _nanopb_hdrs pb_decode.h pb_encode.h
pb_common.h
pb.h
)
foreach
(
FIL
${
_nanopb_srcs
}
)
find_file
(
${
FIL
}
__nano_pb_file NAMES
${
FIL
}
PATHS
${
NANOPB_SRC_ROOT_FOLDER
}
${
NANOPB_INCLUDE_DIRS
}
)
...
...
This diff is collapsed.
Click to expand it.
extra/nanopb.mk
+
1
−
1
View file @
8a95311b
...
...
@@ -5,7 +5,7 @@
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment