diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-23 16:16:33 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-23 16:16:33 +0000 |
commit | 64ac18c8848d3071a16065c84fca3b5e7210ce95 (patch) | |
tree | af3f7a5d759e51ac6ada8d95ea6e946709fb6bab /example/Makefile | |
parent | 9966a8c9b680ada47b6bd5fe96405c0abaf773e4 (diff) |
Changed autogenerated file naming from foo.c to foo.pb.c
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'example/Makefile')
-rw-r--r-- | example/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/example/Makefile b/example/Makefile index efc4a8de..14dd9fa4 100644 --- a/example/Makefile +++ b/example/Makefile @@ -3,9 +3,12 @@ DEPS=../pb_decode.c ../pb_decode.h ../pb_encode.c ../pb_encode.h ../pb.h all: server client -%: %.c $(DEPS) fileproto.h - $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c ../pb_encode.c fileproto.c common.c +clean: + rm -f server client fileproto.pb.c fileproto.pb.h -fileproto.h: fileproto.proto ../generator/nanopb_generator.py +%: %.c $(DEPS) fileproto.pb.h fileproto.pb.c + $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c ../pb_encode.c fileproto.pb.c common.c + +fileproto.pb.c fileproto.pb.h: fileproto.proto ../generator/nanopb_generator.py protoc -I. -I../generator -I/usr/include -ofileproto.pb $< python ../generator/nanopb_generator.py fileproto.pb |