aboutsummaryrefslogtreecommitdiff
path: root/examples/addressbook/Makefile
diff options
context:
space:
mode:
authorOskari Timperi <oskari.timperi@iki.fi>2018-04-17 21:56:05 +0100
committerOskari Timperi <oskari.timperi@iki.fi>2018-04-17 21:56:05 +0100
commit55f3a493871306ac220071574e2a5897851bef54 (patch)
tree509140ba0ccb8c675520368f08d578d33c90f7a7 /examples/addressbook/Makefile
parent55811e0f5467257a7f86fd474e4c6e234c2efa7b (diff)
downloadnimpb-55f3a493871306ac220071574e2a5897851bef54.tar.gz
nimpb-55f3a493871306ac220071574e2a5897851bef54.zip
Update examples
Diffstat (limited to 'examples/addressbook/Makefile')
-rw-r--r--examples/addressbook/Makefile14
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/addressbook/Makefile b/examples/addressbook/Makefile
index 74d41e1..6dbba14 100644
--- a/examples/addressbook/Makefile
+++ b/examples/addressbook/Makefile
@@ -1,12 +1,10 @@
-PLUGIN = ../../generator/protoc_gen_nim
-
all: writer reader
-writer: writer.nim addressbook_pb.nim
- nim c writer.nim
+writer: writer.nim addressbook_pb.nim phonenumber_pb.nim
+ nim c $<
-reader: reader.nim addressbook_pb.nim
- nim c reader.nim
+reader: reader.nim addressbook_pb.nim phonenumber_pb.nim
+ nim c $<
-addressbook_pb.nim: addressbook.proto phonenumber.proto
- protoc --plugin=protoc-gen-nim=$(PLUGIN) --nim_out=. -I. addressbook.proto phonenumber.proto
+%_pb.nim: %.proto
+ nimpb_build -I. --out=. $<