[Android] Make MemoryPressureListener respond to only background or critical Trim...
[chromium-blink-merge.git] / courgette / courgette.gyp
blobf4d03654f4e645ea2b1253b4fe04396074118925
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       'encoded_program.cc',
34       'encoded_program.h',
35       'ensemble.cc',
36       'ensemble.h',
37       'ensemble_apply.cc',
38       'ensemble_create.cc',
39       'memory_allocator.cc',
40       'memory_allocator.h',
41       'region.h',
42       'simple_delta.cc',
43       'simple_delta.h',
44       'streams.cc',
45       'streams.h',
46       'types_elf.h',
47       'types_win_pe.h',
48       'patch_generator_x86_32.h',
49       'patcher_x86_32.h',
50     ],
51   },
52   'targets': [
53     {
54       'target_name': 'courgette_lib',
55       'type': 'static_library',
56       'dependencies': [
57         '../base/base.gyp:base',
58         '../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk',
59       ],
60       'sources': [
61         '<@(courgette_lib_sources)'
62       ],
63     },
64     {
65       'target_name': 'courgette',
66       'type': 'executable',
67       'sources': [
68         'courgette_tool.cc',
69       ],
70       'dependencies': [
71         'courgette_lib',
72         '../base/base.gyp:base',
73       ],
74       'msvs_settings': {
75         'VCLinkerTool': {
76           'LargeAddressAware': 2,
77         },
78       },
79     },
80     {
81       'target_name': 'courgette_minimal_tool',
82       'type': 'executable',
83       'sources': [
84         'courgette_minimal_tool.cc',
85       ],
86       'dependencies': [
87         'courgette_lib',
88         '../base/base.gyp:base',
89       ],
90     },
91     {
92       'target_name': 'courgette_unittests',
93       'type': 'executable',
94       'sources': [
95         'adjustment_method_unittest.cc',
96         'bsdiff_memory_unittest.cc',
97         'base_test_unittest.cc',
98         'base_test_unittest.h',
99         'difference_estimator_unittest.cc',
100         'disassembler_elf_32_x86_unittest.cc',
101         'disassembler_win32_x86_unittest.cc',
102         'encoded_program_unittest.cc',
103         'encode_decode_unittest.cc',
104         'ensemble_unittest.cc',
105         'run_all_unittests.cc',
106         'streams_unittest.cc',
107         'versioning_unittest.cc',
108         'third_party/paged_array_unittest.cc'
109       ],
110       'dependencies': [
111         'courgette_lib',
112         '../base/base.gyp:base',
113         '../base/base.gyp:base_i18n',
114         '../base/base.gyp:test_support_base',
115         '../testing/gtest.gyp:gtest',
116       ],
117       'conditions': [
118         [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
119           'conditions': [
120             ['linux_use_tcmalloc==1', {
121               'dependencies': [
122                 '../base/allocator/allocator.gyp:allocator',
123               ],
124             }],
125           ],
126         }],
127         [ 'toolkit_uses_gtk == 1', {
128           'dependencies': [
129             # Workaround for gyp bug 69.
130             # Needed to handle the #include chain:
131             #   base/test_suite.h
132             #   gtk/gtk.h
133             '../build/linux/system.gyp:gtk',
134           ],
135         }],
136       ],
137       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
138       'msvs_disabled_warnings': [4267, ],
139     },
140     {
141       'target_name': 'courgette_fuzz',
142       'type': 'executable',
143       'sources': [
144         'base_test_unittest.cc',
145         'base_test_unittest.h',
146         'encoded_program_fuzz_unittest.cc',
147        ],
148       'dependencies': [
149         'courgette_lib',
150         '../base/base.gyp:base',
151         '../base/base.gyp:base_i18n',
152         '../base/base.gyp:test_support_base',
153         '../testing/gtest.gyp:gtest',
154       ],
155       'conditions': [
156         [ 'toolkit_uses_gtk == 1', {
157           'dependencies': [
158             # Workaround for gyp bug 69.
159             # Needed to handle the #include chain:
160             #   base/test_suite.h
161             #   gtk/gtk.h
162             '../build/linux/system.gyp:gtk',
163           ],
164         }],
165       ],
166     },
167   ],
168   'conditions': [
169     ['OS=="win" and target_arch=="ia32"', {
170       'targets': [
171         {
172           'target_name': 'courgette_lib64',
173           'type': 'static_library',
174           'dependencies': [
175             '../base/base.gyp:base_nacl_win64',
176             '../third_party/lzma_sdk/lzma_sdk.gyp:lzma_sdk64',
177           ],
178           'sources': [
179             '<@(courgette_lib_sources)',
180           ],
181           'configurations': {
182             'Common_Base': {
183               'msvs_target_platform': 'x64',
184             },
185           },
186         },
187         {
188           'target_name': 'courgette64',
189           'type': 'executable',
190           'sources': [
191             'courgette_tool.cc',
192           ],
193           'dependencies': [
194             'courgette_lib64',
195             '../base/base.gyp:base_nacl_win64',
196           ],
197           'configurations': {
198             'Common_Base': {
199               'msvs_target_platform': 'x64',
200             },
201           },
202         },
203       ],
204     }],
205   ],