|
@@ -5,6 +5,7 @@
|
|
all: cpp java python
|
|
all: cpp java python
|
|
|
|
|
|
cpp: add_person_cpp list_people_cpp
|
|
cpp: add_person_cpp list_people_cpp
|
|
|
|
+dart: add_person_dart list_people_dart
|
|
go: add_person_go list_people_go
|
|
go: add_person_go list_people_go
|
|
gotest: add_person_gotest list_people_gotest
|
|
gotest: add_person_gotest list_people_gotest
|
|
java: add_person_java list_people_java
|
|
java: add_person_java list_people_java
|
|
@@ -16,6 +17,8 @@ clean:
|
|
rm -f protoc_middleman addressbook.pb.cc addressbook.pb.h addressbook_pb2.py com/example/tutorial/AddressBookProtos.java
|
|
rm -f protoc_middleman addressbook.pb.cc addressbook.pb.h addressbook_pb2.py com/example/tutorial/AddressBookProtos.java
|
|
rm -f *.pyc
|
|
rm -f *.pyc
|
|
rm -f protoc_middleman_go tutorial/*.pb.go add_person_go list_people_go
|
|
rm -f protoc_middleman_go tutorial/*.pb.go add_person_go list_people_go
|
|
|
|
+ rm -f protoc_middleman_dart dart_tutorial/*.pb*.dart
|
|
|
|
+ rmdir dart_tutorial 2>/dev/null || true
|
|
rmdir tutorial 2>/dev/null || true
|
|
rmdir tutorial 2>/dev/null || true
|
|
rmdir com/example/tutorial 2>/dev/null || true
|
|
rmdir com/example/tutorial 2>/dev/null || true
|
|
rmdir com/example 2>/dev/null || true
|
|
rmdir com/example 2>/dev/null || true
|
|
@@ -30,6 +33,12 @@ protoc_middleman_go: addressbook.proto
|
|
protoc $$PROTO_PATH --go_out=tutorial addressbook.proto
|
|
protoc $$PROTO_PATH --go_out=tutorial addressbook.proto
|
|
@touch protoc_middleman_go
|
|
@touch protoc_middleman_go
|
|
|
|
|
|
|
|
+protoc_middleman_dart: addressbook.proto
|
|
|
|
+ mkdir -p dart_tutorial # make directory for the dart package
|
|
|
|
+ protoc $$PROTO_PATH --dart_out=dart_tutorial addressbook.proto
|
|
|
|
+ pub get
|
|
|
|
+ @touch protoc_middleman_dart
|
|
|
|
+
|
|
add_person_cpp: add_person.cc protoc_middleman
|
|
add_person_cpp: add_person.cc protoc_middleman
|
|
pkg-config --cflags protobuf # fails if protobuf is not installed
|
|
pkg-config --cflags protobuf # fails if protobuf is not installed
|
|
c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
|
|
c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf`
|
|
@@ -38,6 +47,10 @@ list_people_cpp: list_people.cc protoc_middleman
|
|
pkg-config --cflags protobuf # fails if protobuf is not installed
|
|
pkg-config --cflags protobuf # fails if protobuf is not installed
|
|
c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
|
|
c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf`
|
|
|
|
|
|
|
|
+add_person_dart: add_person.dart protoc_middleman_dart
|
|
|
|
+
|
|
|
|
+list_people_dart: list_people.dart protoc_middleman_dart
|
|
|
|
+
|
|
add_person_go: add_person.go protoc_middleman_go
|
|
add_person_go: add_person.go protoc_middleman_go
|
|
go build -o add_person_go add_person.go
|
|
go build -o add_person_go add_person.go
|
|
|
|
|