Optimize CommandBufferHelper::GetSpace().
[chromium-blink-merge.git] / third_party / libwebp / libwebp.gyp
blob49526df720c0a787a35608ae763c6011c5820ab3
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.
6   'targets': [
7     {
8       'target_name': 'libwebp_dec',
9       'type': 'static_library',
10       'dependencies' : [
11         'libwebp_dsp',
12         'libwebp_dsp_neon',
13         'libwebp_utils',
14       ],
15       'include_dirs': ['.'],
16       'sources': [
17         'dec/alpha.c',
18         'dec/buffer.c',
19         'dec/frame.c',
20         'dec/idec.c',
21         'dec/io.c',
22         'dec/layer.c',
23         'dec/quant.c',
24         'dec/tree.c',
25         'dec/vp8.c',
26         'dec/vp8l.c',
27         'dec/webp.c',
28       ],
29     },
30     {
31       'target_name': 'libwebp_demux',
32       'type': 'static_library',
33       'include_dirs': ['.'],
34       'sources': [
35         'demux/demux.c',
36       ],
37     },
38     {
39       'target_name': 'libwebp_dsp',
40       'type': 'static_library',
41       'include_dirs': ['.'],
42       'sources': [
43         'dsp/cpu.c',
44         'dsp/dec.c',
45         'dsp/dec_sse2.c',
46         'dsp/enc.c',
47         'dsp/enc_sse2.c',
48         'dsp/lossless.c',
49         'dsp/upsampling.c',
50         'dsp/upsampling_sse2.c',
51         'dsp/yuv.c',
52       ],
53       'conditions': [
54         ['OS == "android"', {
55           'includes': [ '../../build/android/cpufeatures.gypi' ],
56         }],
57         ['order_profiling != 0', {
58           'target_conditions' : [
59             ['_toolset=="target"', {
60               'cflags!': [ '-finstrument-functions' ],
61             }],
62           ],
63         }],
64       ],
65     },
66     {
67       'target_name': 'libwebp_dsp_neon',
68       'conditions': [
69         ['target_arch == "arm" and arm_version >= 7 and (arm_neon == 1 or arm_neon_optional == 1)', {
70           'type': 'static_library',
71           'include_dirs': ['.'],
72           'sources': [
73             'dsp/dec_neon.c',
74             'dsp/enc_neon.c',
75             'dsp/upsampling_neon.c',
76           ],
77           # behavior similar to *.c.neon in an Android.mk
78           'cflags!': [ '-mfpu=vfpv3-d16' ],
79           'cflags': [ '-mfpu=neon' ],
80         },{  # "target_arch != "arm" or arm_version < 7"
81           'type': 'none',
82         }],
83         ['order_profiling != 0', {
84           'target_conditions' : [
85             ['_toolset=="target"', {
86               'cflags!': [ '-finstrument-functions' ],
87             }],
88           ],
89         }],
90       ],
91     },
92     {
93       'target_name': 'libwebp_enc',
94       'type': 'static_library',
95       'include_dirs': ['.'],
96       'sources': [
97         'enc/alpha.c',
98         'enc/analysis.c',
99         'enc/backward_references.c',
100         'enc/config.c',
101         'enc/cost.c',
102         'enc/filter.c',
103         'enc/frame.c',
104         'enc/histogram.c',
105         'enc/iterator.c',
106         'enc/layer.c',
107         'enc/picture.c',
108         'enc/quant.c',
109         'enc/syntax.c',
110         'enc/token.c',
111         'enc/tree.c',
112         'enc/vp8l.c',
113         'enc/webpenc.c',
114       ],
115     },
116     {
117       'target_name': 'libwebp_utils',
118       'type': 'static_library',
119       'include_dirs': ['.'],
120       'sources': [
121         'utils/alpha_processing.c',
122         'utils/bit_reader.c',
123         'utils/bit_writer.c',
124         'utils/color_cache.c',
125         'utils/filters.c',
126         'utils/huffman.c',
127         'utils/huffman_encode.c',
128         'utils/quant_levels.c',
129         'utils/quant_levels_dec.c',
130         'utils/random.c',
131         'utils/rescaler.c',
132         'utils/thread.c',
133         'utils/utils.c',
134       ],
135     },
136     {
137       'target_name': 'libwebp',
138       'type': 'none',
139       'dependencies' : [
140         'libwebp_dec',
141         'libwebp_demux',
142         'libwebp_dsp',
143         'libwebp_dsp_neon',
144         'libwebp_enc',
145         'libwebp_utils',
146       ],
147       'direct_dependent_settings': {
148         'include_dirs': ['.'],
149       },
150       'conditions': [
151         ['OS!="win"', {'product_name': 'webp'}],
152       ],
153     },
154   ],