aboutsummaryrefslogtreecommitdiff
path: root/examples/addressbook/Makefile
diff options
context:
space:
mode:
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=. $<