summaryrefslogtreecommitdiffstats
path: root/example/Makefile
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-08-17 19:03:06 +0000
committerPetteri Aimonen <jpa@npb.mail.kapsi.fi>2011-08-17 19:03:06 +0000
commit7f53c3f7484679c1e38607f59542d43be1387650 (patch)
tree396198a24a1661eb7af87d0364a936d8df98a5ae /example/Makefile
parent2cefaeaf61f38f1566293e53b4708e9ceff2d945 (diff)
Example
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'example/Makefile')
-rw-r--r--example/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/example/Makefile b/example/Makefile
new file mode 100644
index 00000000..0f08f2d7
--- /dev/null
+++ b/example/Makefile
@@ -0,0 +1,11 @@
+CFLAGS=-ansi -Wall -Werror -I .. -g -O0
+DEPS=../pb_decode.c ../pb_decode.h ../pb_encode.c ../pb_encode.h ../pb.h
+
+all: server
+
+%: %.c $(DEPS) fileproto.h
+ $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c ../pb_encode.c fileproto.c
+
+fileproto.h: fileproto.proto ../generator/nanopb_generator.py
+ protoc -I. -I../generator -I/usr/include -ofileproto.pb $<
+ python ../generator/nanopb_generator.py fileproto.pb