1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
'variables': {
# Force rlz to use chrome's networking stack.
'force_rlz_use_chrome_net%': 1,
},
'conditions': [
['force_rlz_use_chrome_net or OS!="win"', {
'rlz_use_chrome_net%': 1,
}, {
'rlz_use_chrome_net%': 0,
}],
],
},
'target_defaults': {
'include_dirs': [
'..',
],
},
'targets': [
{
'target_name': 'rlz_lib',
'type': 'static_library',
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
],
'sources': [
'chromeos/lib/machine_id_chromeos.cc',
'chromeos/lib/rlz_value_store_chromeos.cc',
'chromeos/lib/rlz_value_store_chromeos.h',
'ios/lib/machine_id_ios.cc',
'lib/assert.cc',
'lib/assert.h',
'lib/crc32.h',
'lib/crc32_wrapper.cc',
'lib/crc8.h',
'lib/crc8.cc',
'lib/financial_ping.cc',
'lib/financial_ping.h',
'lib/lib_values.cc',
'lib/machine_id.cc',
'lib/machine_id.h',
'lib/recursive_cross_process_lock_posix.cc',
'lib/recursive_cross_process_lock_posix.h',
'lib/rlz_enums.h',
'lib/rlz_lib.cc',
'lib/rlz_lib.h',
'lib/rlz_lib_clear.cc',
'lib/lib_values.h',
'lib/rlz_value_store.h',
'lib/string_utils.cc',
'lib/string_utils.h',
'mac/lib/machine_id_mac.cc',
'mac/lib/rlz_value_store_mac.mm',
'mac/lib/rlz_value_store_mac.h',
'win/lib/lib_mutex.cc',
'win/lib/lib_mutex.h',
'win/lib/machine_deal.cc',
'win/lib/machine_deal.h',
'win/lib/machine_id_win.cc',
'win/lib/process_info.cc',
'win/lib/process_info.h',
'win/lib/registry_util.cc',
'win/lib/registry_util.h',
'win/lib/rlz_lib_win.cc',
'win/lib/rlz_value_store_registry.cc',
'win/lib/rlz_value_store_registry.h',
],
'conditions': [
['rlz_use_chrome_net==1', {
'defines': [
'RLZ_NETWORK_IMPLEMENTATION_CHROME_NET',
],
'direct_dependent_settings': {
'defines': [
'RLZ_NETWORK_IMPLEMENTATION_CHROME_NET',
],
},
'dependencies': [
'../net/net.gyp:net',
'../url/url.gyp:url_lib',
],
}, {
'defines': [
'RLZ_NETWORK_IMPLEMENTATION_WIN_INET',
],
'direct_dependent_settings': {
'defines': [
'RLZ_NETWORK_IMPLEMENTATION_WIN_INET',
],
},
}],
],
'target_conditions': [
# Need 'target_conditions' to override default filename_rules to include
# the files on iOS.
['OS=="ios"', {
'sources/': [
['include', '^mac/lib/rlz_value_store_mac\\.'],
],
}],
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
{
'target_name': 'test_support_rlz',
'type': 'static_library',
'dependencies': [
':rlz_lib',
'../base/base.gyp:base',
'../base/base.gyp:test_support_base',
'../testing/gtest.gyp:gtest',
],
'sources': [
'test/rlz_test_helpers.cc',
'test/rlz_test_helpers.h',
],
},
{
'target_name': 'rlz_unittests',
'type': 'executable',
'dependencies': [
':rlz_lib',
':test_support_rlz',
'../base/base.gyp:base',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../third_party/zlib/zlib.gyp:zlib',
],
'sources': [
'lib/crc32_unittest.cc',
'lib/crc8_unittest.cc',
'lib/financial_ping_test.cc',
'lib/lib_values_unittest.cc',
'lib/machine_id_unittest.cc',
'lib/rlz_lib_test.cc',
'lib/string_utils_unittest.cc',
'test/rlz_unittest_main.cc',
'win/lib/machine_deal_test.cc',
],
'conditions': [
['rlz_use_chrome_net==1', {
'dependencies': [
'../net/net.gyp:net_test_support',
],
}],
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
{
'target_name': 'rlz_id',
'type': 'executable',
'dependencies': [
':rlz_lib',
],
'sources': [
'examples/rlz_id.cc',
],
},
],
'conditions': [
['OS=="win"', {
'targets': [
{
'target_name': 'rlz',
'type': 'shared_library',
'sources': [
'win/dll/dll_main.cc',
'win/dll/exports.cc',
],
'dependencies': [
':rlz_lib',
'../third_party/zlib/zlib.gyp:zlib',
],
},
],
}],
],
}
|