Torne (Richard Coles) | 5821806 | 2012-11-14 11:43:16 +0000 | [diff] [blame^] | 1 | # Copyright (c) 2012 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 | 'variables': { |
| 9 | # Force rlz to use chrome's networking stack. |
| 10 | 'force_rlz_use_chrome_net%': 1, |
| 11 | }, |
| 12 | 'conditions': [ |
| 13 | ['force_rlz_use_chrome_net or OS!="win"', { |
| 14 | 'rlz_use_chrome_net%': 1, |
| 15 | }, { |
| 16 | 'rlz_use_chrome_net%': 0, |
| 17 | }], |
| 18 | ], |
| 19 | }, |
| 20 | 'target_defaults': { |
| 21 | 'include_dirs': [ |
| 22 | '..', |
| 23 | ], |
| 24 | }, |
| 25 | 'targets': [ |
| 26 | { |
| 27 | 'target_name': 'rlz_lib', |
| 28 | 'type': 'static_library', |
| 29 | 'dependencies': [ |
| 30 | '../base/base.gyp:base', |
| 31 | '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', |
| 32 | ], |
| 33 | 'sources': [ |
| 34 | 'chromeos/lib/machine_id_chromeos.cc', |
| 35 | 'chromeos/lib/rlz_value_store_chromeos.cc', |
| 36 | 'chromeos/lib/rlz_value_store_chromeos.h', |
| 37 | 'lib/assert.cc', |
| 38 | 'lib/assert.h', |
| 39 | 'lib/crc32.h', |
| 40 | 'lib/crc32_wrapper.cc', |
| 41 | 'lib/crc8.h', |
| 42 | 'lib/crc8.cc', |
| 43 | 'lib/financial_ping.cc', |
| 44 | 'lib/financial_ping.h', |
| 45 | 'lib/lib_values.cc', |
| 46 | 'lib/machine_id.cc', |
| 47 | 'lib/machine_id.h', |
| 48 | 'lib/recursive_lock.cc', |
| 49 | 'lib/recursive_lock.h', |
| 50 | 'lib/rlz_enums.h', |
| 51 | 'lib/rlz_lib.cc', |
| 52 | 'lib/rlz_lib.h', |
| 53 | 'lib/rlz_lib_clear.cc', |
| 54 | 'lib/lib_values.h', |
| 55 | 'lib/rlz_value_store.h', |
| 56 | 'lib/string_utils.cc', |
| 57 | 'lib/string_utils.h', |
| 58 | 'mac/lib/machine_id_mac.cc', |
| 59 | 'mac/lib/rlz_value_store_mac.mm', |
| 60 | 'mac/lib/rlz_value_store_mac.h', |
| 61 | 'win/lib/lib_mutex.cc', |
| 62 | 'win/lib/lib_mutex.h', |
| 63 | 'win/lib/machine_deal.cc', |
| 64 | 'win/lib/machine_deal.h', |
| 65 | 'win/lib/machine_id_win.cc', |
| 66 | 'win/lib/process_info.cc', |
| 67 | 'win/lib/process_info.h', |
| 68 | 'win/lib/registry_util.cc', |
| 69 | 'win/lib/registry_util.h', |
| 70 | 'win/lib/rlz_lib.h', |
| 71 | 'win/lib/rlz_lib_win.cc', |
| 72 | 'win/lib/rlz_value_store_registry.cc', |
| 73 | 'win/lib/rlz_value_store_registry.h', |
| 74 | 'win/lib/vista_winnt.h', |
| 75 | ], |
| 76 | 'conditions': [ |
| 77 | ['rlz_use_chrome_net==1', { |
| 78 | 'defines': [ |
| 79 | 'RLZ_NETWORK_IMPLEMENTATION_CHROME_NET', |
| 80 | ], |
| 81 | 'direct_dependent_settings': { |
| 82 | 'defines': [ |
| 83 | 'RLZ_NETWORK_IMPLEMENTATION_CHROME_NET', |
| 84 | ], |
| 85 | }, |
| 86 | 'dependencies': [ |
| 87 | '../build/temp_gyp/googleurl.gyp:googleurl', |
| 88 | '../net/net.gyp:net', |
| 89 | ], |
| 90 | }, { |
| 91 | 'defines': [ |
| 92 | 'RLZ_NETWORK_IMPLEMENTATION_WIN_INET', |
| 93 | ], |
| 94 | 'direct_dependent_settings': { |
| 95 | 'defines': [ |
| 96 | 'RLZ_NETWORK_IMPLEMENTATION_WIN_INET', |
| 97 | ], |
| 98 | }, |
| 99 | }], |
| 100 | ['chromeos==0', { |
| 101 | 'sources!': [ |
| 102 | 'lib/recursive_lock.cc', |
| 103 | 'lib/recursive_lock.h', |
| 104 | ] |
| 105 | }], |
| 106 | ], |
| 107 | }, |
| 108 | { |
| 109 | 'target_name': 'rlz_unittests', |
| 110 | 'type': 'executable', |
| 111 | 'dependencies': [ |
| 112 | ':rlz_lib', |
| 113 | '../base/base.gyp:base', |
| 114 | '../base/base.gyp:base_prefs', |
| 115 | '../testing/gmock.gyp:gmock', |
| 116 | '../testing/gtest.gyp:gtest', |
| 117 | '../third_party/zlib/zlib.gyp:zlib', |
| 118 | ], |
| 119 | 'sources': [ |
| 120 | 'lib/crc32_unittest.cc', |
| 121 | 'lib/crc8_unittest.cc', |
| 122 | 'lib/financial_ping_test.cc', |
| 123 | 'lib/lib_values_unittest.cc', |
| 124 | 'lib/machine_id_unittest.cc', |
| 125 | 'lib/recursive_lock_unittest.cc', |
| 126 | 'lib/rlz_lib_test.cc', |
| 127 | 'lib/string_utils_unittest.cc', |
| 128 | 'test/rlz_test_helpers.cc', |
| 129 | 'test/rlz_test_helpers.h', |
| 130 | 'test/rlz_unittest_main.cc', |
| 131 | 'win/lib/machine_deal_test.cc', |
| 132 | ], |
| 133 | 'conditions': [ |
| 134 | ['rlz_use_chrome_net==1', { |
| 135 | 'dependencies': [ |
| 136 | '../net/net.gyp:net_test_support', |
| 137 | ], |
| 138 | }], |
| 139 | ['chromeos==0', { |
| 140 | 'sources!': [ |
| 141 | 'lib/recursive_lock_unittest.cc', |
| 142 | ], |
| 143 | }] |
| 144 | ], |
| 145 | }, |
| 146 | { |
| 147 | 'target_name': 'rlz_id', |
| 148 | 'type': 'executable', |
| 149 | 'dependencies': [ |
| 150 | ':rlz_lib', |
| 151 | ], |
| 152 | 'sources': [ |
| 153 | 'examples/rlz_id.cc', |
| 154 | ], |
| 155 | }, |
| 156 | ], |
| 157 | 'conditions': [ |
| 158 | ['OS=="win"', { |
| 159 | 'targets': [ |
| 160 | { |
| 161 | 'target_name': 'rlz', |
| 162 | 'type': 'shared_library', |
| 163 | 'sources': [ |
| 164 | 'win/dll/dll_main.cc', |
| 165 | 'win/dll/exports.cc', |
| 166 | ], |
| 167 | 'dependencies': [ |
| 168 | ':rlz_lib', |
| 169 | '../third_party/zlib/zlib.gyp:zlib', |
| 170 | ], |
| 171 | }, |
| 172 | ], |
| 173 | }], |
| 174 | ], |
| 175 | } |