summaryrefslogtreecommitdiffstats
path: root/example/Makefile
diff options
context:
space:
mode:
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