A few last Android infobar cleanups:
[chromium-blink-merge.git] / courgette / courgette.gyp
blob9de536f508b0c953db0eedcf71e3f9d95c897ef6
1 # Copyright (c) 2011 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.
6   'variables': {
7     'chromium_code': 1,
8     'courgette_lib_sources': [
9       'adjustment_method.cc',
10       'adjustment_method_2.cc',
11       'adjustment_method.h',
12       'assembly_program.cc',
13       'assembly_program.h',
14       'third_party/bsdiff.h',
15       'third_party/bsdiff_apply.cc',
16       'third_party/bsdiff_create.cc',
17       'third_party/paged_array.h',
18       'courgette.h',
19       'crc.cc',
20       'crc.h',
21       'difference_estimator.cc',
22       'difference_estimator.h',
23       'disassembler.cc',
24       'disassembler.h',
25       'disassembler_elf_32.cc',
26       'disassembler_elf_32.h',
27       'disassembler_elf_32_arm.cc',
28       'disassembler_elf_32_arm.h',
29       'disassembler_elf_32_x86.cc',
30       'disassembler_elf_32_x86.h',
31       'disassembler_win32_x86.cc',
32       'disassembler_win32_x86.h',
33       'disassembler_win32_x64.cc',
34       'disassembler_win32_x64.h',
35       'encoded_program.cc',
36       'encoded_program.h',
37       'ensemble.cc',
38       'ensemble.h',
39       'ensemble_apply.cc',
40       'ensemble_create.cc',
41       'memory_allocator.cc',
42       'memory_allocator.h',
43       'region.h',
44       'simple_delta.cc',
45       'simple_delta.h',
46       'streams.cc',
47       'streams.h',
48       'types_elf.h',
49       'types_win_pe.h',
50       'patch_generator_x86_32.h',
51       'patcher_x86_32.h',
52     ],
53   },
54   'targets': [
55     {
56       'target_name': 'courgette_lib',
57       'type': 'static_library',
58       'dependencies': [
59         '../base/base.gyp:base',
60         '../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk',
61       ],
62       'sources': [
63         '<@(courgette_lib_sources)'
64       ],
65     },
66     {
67       'target_name': 'courgette',
68       'type': 'executable',
69       'sources': [
70         'courgette_tool.cc',
71       ],
72       'dependencies': [
73         'courgette_lib',
74         '../base/base.gyp:base',
75       ],
76       'msvs_settings': {
77         'VCLinkerTool': {
78           'LargeAddressAware': 2,
79         },
80       },
81     },
82     {
83       'target_name': 'courgette_minimal_tool',
84       'type': 'executable',
85       'sources': [
86         'courgette_minimal_tool.cc',
87       ],
88       'dependencies': [
89         'courgette_lib',
90         '../base/base.gyp:base',
91       ],
92     },
93     {
94       'target_name': 'courgette_unittests',
95       'type': 'executable',
96       'sources': [
97         'adjustment_method_unittest.cc',
98         'bsdiff_memory_unittest.cc',
99         'base_test_unittest.cc',
100         'base_test_unittest.h',
101         'difference_estimator_unittest.cc',
102         'disassembler_elf_32_x86_unittest.cc',
103         'disassembler_win32_x86_unittest.cc',
104         'disassembler_win32_x64_unittest.cc',
105         'encoded_program_unittest.cc',
106         'encode_decode_unittest.cc',
107         'ensemble_unittest.cc',
108         'streams_unittest.cc',
109         'typedrva_unittest.cc',
110         'versioning_unittest.cc',
111         'third_party/paged_array_unittest.cc'
112       ],
113       'dependencies': [
114         'courgette_lib',
115         '../base/base.gyp:base',
116         '../base/base.gyp:base_i18n',
117         '../base/base.gyp:run_all_unittests',
118         '../base/base.gyp:test_support_base',
119         '../testing/gtest.gyp:gtest',
120       ],
121       'conditions': [
122         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
123           'conditions': [
124             ['linux_use_tcmalloc==1', {
125               'dependencies': [
126                 '../base/allocator/allocator.gyp:allocator',
127               ],
128             }],
129           ],
130         }],
131         [ 'toolkit_uses_gtk == 1', {
132           'dependencies': [
133             # Workaround for gyp bug 69.
134             # Needed to handle the #include chain:
135             #   base/test_suite.h
136             #   gtk/gtk.h
137             '../build/linux/system.gyp:gtk',
138           ],
139         }],
140       ],
141       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
142       'msvs_disabled_warnings': [4267, ],
143     },
144     {
145       'target_name': 'courgette_fuzz',
146       'type': 'executable',
147       'sources': [
148         'base_test_unittest.cc',
149         'base_test_unittest.h',
150         'encoded_program_fuzz_unittest.cc',
151        ],
152       'dependencies': [
153         'courgette_lib',
154         '../base/base.gyp:base',
155         '../base/base.gyp:base_i18n',
156         '../base/base.gyp:test_support_base',
157         '../testing/gtest.gyp:gtest',
158       ],
159       'conditions': [
160         [ 'toolkit_uses_gtk == 1', {
161           'dependencies': [
162             # Workaround for gyp bug 69.
163             # Needed to handle the #include chain:
164             #   base/test_suite.h
165             #   gtk/gtk.h
166             '../build/linux/system.gyp:gtk',
167           ],
168         }],
169       ],
170     },
171   ],
172   'conditions': [
173     ['OS=="win" and target_arch=="ia32"', {
174       'targets': [
175         {
176           'target_name': 'courgette_lib64',
177           'type': 'static_library',
178           'dependencies': [
179             '../base/base.gyp:base_nacl_win64',
180             '../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk64',
181           ],
182           'sources': [
183             '<@(courgette_lib_sources)',
184           ],
185           'configurations': {
186             'Common_Base': {
187               'msvs_target_platform': 'x64',
188             },
189           },
190         },
191         {
192           'target_name': 'courgette64',
193           'type': 'executable',
194           'sources': [
195             'courgette_tool.cc',
196           ],
197           'dependencies': [
198             'courgette_lib64',
199             '../base/base.gyp:base_nacl_win64',
200           ],
201           'configurations': {
202             'Common_Base': {
203               'msvs_target_platform': 'x64',
204             },
205           },
206         },
207       ],
208     }],
209     # The build infrastructure needs courgette to be named courgette64.
210     ['OS=="win" and target_arch=="x64"', {
211       'targets': [
212         {
213           'target_name': 'courgette64',
214           'type': 'none',
215           'dependencies': [
216             'courgette',
217           ],
218           'actions': [{
219             'action_name': 'courgette64',
220             'inputs': [
221               '<(PRODUCT_DIR)/courgette.exe',
222             ],
223             'outputs': [
224               '<(PRODUCT_DIR)/courgette64.exe',
225             ],
226             'action': [
227               'python',
228               '../build/cp.py',
229               '<@(_inputs)',
230               '<@(_outputs)'
231             ],
232           }],
233         },
234       ],
235     }],
236   ],