Link Java Nano generator into protoc.

pull/104/head
Jisi Liu 10 years ago
parent 99aa0f9e8f
commit e9bbfbcd38
  1. 21
      src/Makefile.am
  2. 6
      src/google/protobuf/compiler/main.cc

@ -239,6 +239,27 @@ libprotoc_la_SOURCES = \
google/protobuf/compiler/java/java_string_field.h \
google/protobuf/compiler/java/java_doc_comment.cc \
google/protobuf/compiler/java/java_doc_comment.h \
google/protobuf/compiler/javanano/javanano_enum.cc \
google/protobuf/compiler/javanano/javanano_enum_field.h \
google/protobuf/compiler/javanano/javanano_extension.cc \
google/protobuf/compiler/javanano/javanano_field.cc \
google/protobuf/compiler/javanano/javanano_file.cc \
google/protobuf/compiler/javanano/javanano_generator.cc \
google/protobuf/compiler/javanano/javanano_helpers.cc \
google/protobuf/compiler/javanano/javanano_message.cc \
google/protobuf/compiler/javanano/javanano_message_field.h \
google/protobuf/compiler/javanano/javanano_params.h \
google/protobuf/compiler/javanano/javanano_primitive_field.h \
google/protobuf/compiler/javanano/javanano_enum_field.cc \
google/protobuf/compiler/javanano/javanano_enum.h \
google/protobuf/compiler/javanano/javanano_extension.h \
google/protobuf/compiler/javanano/javanano_field.h \
google/protobuf/compiler/javanano/javanano_file.h \
google/protobuf/compiler/javanano/javanano_generator.h \
google/protobuf/compiler/javanano/javanano_helpers.h \
google/protobuf/compiler/javanano/javanano_message_field.cc \
google/protobuf/compiler/javanano/javanano_message.h \
google/protobuf/compiler/javanano/javanano_primitive_field.cc \
google/protobuf/compiler/python/python_generator.cc
bin_PROGRAMS = protoc

@ -34,6 +34,7 @@
#include <google/protobuf/compiler/cpp/cpp_generator.h>
#include <google/protobuf/compiler/python/python_generator.h>
#include <google/protobuf/compiler/java/java_generator.h>
#include <google/protobuf/compiler/javanano/javanano_generator.h>
int main(int argc, char* argv[]) {
@ -57,5 +58,10 @@ int main(int argc, char* argv[]) {
cli.RegisterGenerator("--python_out", &py_generator,
"Generate Python source file.");
// Java Nano
google::protobuf::compiler::javanano::JavaNanoGenerator javanano_generator;
cli.RegisterGenerator("--javanano_out", &javanano_generator,
"Generate Java Nano source file.");
return cli.Run(argc, argv);
}

Loading…
Cancel
Save