1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 { 6 'variables': { 7 'chromium_code': 1, 8 'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out', 9 }, 10 'targets': [ 11 { 12 # Protobuf compiler / generate rule for sync.proto. This is used by 13 # test code in net, which is why it's isolated into its own .gyp file. 14 'target_name': 'sync_proto', 15 'type': 'none', 16 'sources': [ 17 'sync.proto', 18 'encryption.proto', 19 'app_specifics.proto', 20 'autofill_specifics.proto', 21 'bookmark_specifics.proto', 22 'extension_specifics.proto', 23 'nigori_specifics.proto', 24 'password_specifics.proto', 25 'preference_specifics.proto', 26 'session_specifics.proto', 27 'test.proto', 28 'theme_specifics.proto', 29 'typed_url_specifics.proto', 30 ], 31 'rules': [ 32 { 33 'rule_name': 'genproto', 34 'extension': 'proto', 35 'inputs': [ 36 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', 37 ], 38 'outputs': [ 39 '<(PRODUCT_DIR)/pyproto/sync_pb/<(RULE_INPUT_ROOT)_pb2.py', 40 '<(protoc_out_dir)/chrome/browser/sync/protocol/<(RULE_INPUT_ROOT).pb.h', 41 '<(protoc_out_dir)/chrome/browser/sync/protocol/<(RULE_INPUT_ROOT).pb.cc', 42 ], 43 'action': [ 44 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)protoc<(EXECUTABLE_SUFFIX)', 45 '--proto_path=.', 46 './<(RULE_INPUT_ROOT)<(RULE_INPUT_EXT)', 47 '--cpp_out=<(protoc_out_dir)/chrome/browser/sync/protocol', 48 '--python_out=<(PRODUCT_DIR)/pyproto/sync_pb', 49 ], 50 'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)', 51 }, 52 ], 53 'dependencies': [ 54 '../../../../third_party/protobuf/protobuf.gyp:protoc#host', 55 ], 56 }, 57 { 58 'target_name': 'sync_proto_cpp', 59 'type': '<(library)', 60 'sources': [ 61 '<(protoc_out_dir)/chrome/browser/sync/protocol/sync.pb.cc', 62 '<(protoc_out_dir)/chrome/browser/sync/protocol/sync.pb.h', 63 '<(protoc_out_dir)/chrome/browser/sync/protocol/encryption.pb.cc', 64 '<(protoc_out_dir)/chrome/browser/sync/protocol/encryption.pb.h', 65 '<(protoc_out_dir)/chrome/browser/sync/protocol/app_specifics.pb.cc', 66 '<(protoc_out_dir)/chrome/browser/sync/protocol/app_specifics.pb.h', 67 '<(protoc_out_dir)/chrome/browser/sync/protocol/autofill_specifics.pb.cc', 68 '<(protoc_out_dir)/chrome/browser/sync/protocol/autofill_specifics.pb.h', 69 '<(protoc_out_dir)/chrome/browser/sync/protocol/bookmark_specifics.pb.cc', 70 '<(protoc_out_dir)/chrome/browser/sync/protocol/bookmark_specifics.pb.h', 71 '<(protoc_out_dir)/chrome/browser/sync/protocol/extension_specifics.pb.cc', 72 '<(protoc_out_dir)/chrome/browser/sync/protocol/extension_specifics.pb.h', 73 '<(protoc_out_dir)/chrome/browser/sync/protocol/nigori_specifics.pb.cc', 74 '<(protoc_out_dir)/chrome/browser/sync/protocol/nigori_specifics.pb.h', 75 '<(protoc_out_dir)/chrome/browser/sync/protocol/password_specifics.pb.cc', 76 '<(protoc_out_dir)/chrome/browser/sync/protocol/password_specifics.pb.h', 77 '<(protoc_out_dir)/chrome/browser/sync/protocol/preference_specifics.pb.cc', 78 '<(protoc_out_dir)/chrome/browser/sync/protocol/preference_specifics.pb.h', 79 '<(protoc_out_dir)/chrome/browser/sync/protocol/session_specifics.pb.cc', 80 '<(protoc_out_dir)/chrome/browser/sync/protocol/session_specifics.pb.h', 81 '<(protoc_out_dir)/chrome/browser/sync/protocol/theme_specifics.pb.cc', 82 '<(protoc_out_dir)/chrome/browser/sync/protocol/theme_specifics.pb.h', 83 '<(protoc_out_dir)/chrome/browser/sync/protocol/typed_url_specifics.pb.cc', 84 '<(protoc_out_dir)/chrome/browser/sync/protocol/typed_url_specifics.pb.h', 85 ], 86 'export_dependent_settings': [ 87 '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', 88 'sync_proto', 89 ], 90 'dependencies': [ 91 '../../../../third_party/protobuf/protobuf.gyp:protobuf_lite', 92 'sync_proto', 93 ], 94 'direct_dependent_settings': { 95 'include_dirs': [ 96 '<(protoc_out_dir)', 97 ], 98 }, 99 # This target exports a hard dependency because it includes generated 100 # header files. 101 'hard_dependency': 1, 102 }, 103 ], 104 } 105 106 # Local Variables: 107 # tab-width:2 108 # indent-tabs-mode:nil 109 # End: 110 # vim: set expandtab tabstop=2 shiftwidth=2: 111