Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/libwebp/libwebp.gyp

Issue 14203006: Extract use_system_foo logic out of gyp files, patch 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': { 6 'targets': [
7 'use_system_libwebp%': 0, 7 {
8 }, 8 'target_name': 'libwebp_dec',
9 'conditions': [ 9 'type': 'static_library',
10 ['use_system_libwebp==0', { 10 'include_dirs': ['.'],
11 'targets': [ 11 'sources': [
12 { 12 'dec/alpha.c',
13 'target_name': 'libwebp_dec', 13 'dec/buffer.c',
14 'dec/frame.c',
15 'dec/idec.c',
16 'dec/io.c',
17 'dec/layer.c',
18 'dec/quant.c',
19 'dec/tree.c',
20 'dec/vp8.c',
21 'dec/vp8l.c',
22 'dec/webp.c',
23 ],
24 },
25 {
26 'target_name': 'libwebp_demux',
27 'type': 'static_library',
28 'include_dirs': ['.'],
29 'sources': [
30 'demux/demux.c',
31 ],
32 },
33 {
34 'target_name': 'libwebp_dsp',
35 'type': 'static_library',
36 'include_dirs': ['.'],
37 'sources': [
38 'dsp/cpu.c',
39 'dsp/dec.c',
40 'dsp/dec_sse2.c',
41 'dsp/enc.c',
42 'dsp/enc_sse2.c',
43 'dsp/lossless.c',
44 'dsp/upsampling.c',
45 'dsp/upsampling_sse2.c',
46 'dsp/yuv.c',
47 ],
48 'conditions': [
49 ['OS == "android"', {
50 'includes': [ '../../build/android/cpufeatures.gypi' ],
51 }],
52 ['order_profiling != 0', {
53 'target_conditions' : [
54 ['_toolset=="target"', {
55 'cflags!': [ '-finstrument-functions' ],
56 }],
57 ],
58 }],
59 ],
60 },
61 {
62 'target_name': 'libwebp_dsp_neon',
63 'conditions': [
64 ['armv7 == 1', {
14 'type': 'static_library', 65 'type': 'static_library',
15 'include_dirs': ['.'], 66 'include_dirs': ['.'],
16 'sources': [ 67 'sources': [
17 'dec/alpha.c', 68 'dsp/dec_neon.c',
18 'dec/buffer.c', 69 'dsp/enc_neon.c',
19 'dec/frame.c', 70 'dsp/upsampling_neon.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 ], 71 ],
29 }, 72 # behavior similar to *.c.neon in an Android.mk
30 { 73 'cflags!': [ '-mfpu=vfpv3-d16' ],
31 'target_name': 'libwebp_demux', 74 'cflags': [ '-mfpu=neon' ],
32 'type': 'static_library', 75 },{ # "armv7 != 1"
33 'include_dirs': ['.'], 76 'type': 'none',
34 'sources': [ 77 }],
35 'demux/demux.c', 78 ['order_profiling != 0', {
36 ], 79 'target_conditions' : [
37 }, 80 ['_toolset=="target"', {
38 { 81 'cflags!': [ '-finstrument-functions' ],
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 }], 82 }],
64 ], 83 ],
65 }, 84 }],
66 {
67 'target_name': 'libwebp_dsp_neon',
68 'conditions': [
69 ['armv7 == 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 },{ # "armv7 != 1"
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/bit_reader.c',
122 'utils/bit_writer.c',
123 'utils/color_cache.c',
124 'utils/filters.c',
125 'utils/huffman.c',
126 'utils/huffman_encode.c',
127 'utils/quant_levels.c',
128 'utils/quant_levels_dec.c',
129 'utils/rescaler.c',
130 'utils/thread.c',
131 'utils/utils.c',
132 ],
133 },
134 {
135 'target_name': 'libwebp',
136 'type': 'none',
137 'dependencies' : [
138 'libwebp_dec',
139 'libwebp_demux',
140 'libwebp_dsp',
141 'libwebp_dsp_neon',
142 'libwebp_enc',
143 'libwebp_utils',
144 ],
145 'direct_dependent_settings': {
146 'include_dirs': ['.'],
147 },
148 'conditions': [
149 ['OS!="win"', {'product_name': 'webp'}],
150 ],
151 },
152 ], 85 ],
153 }, { 86 },
154 'targets': [ 87 {
155 { 88 'target_name': 'libwebp_enc',
156 'target_name': 'libwebp', 89 'type': 'static_library',
157 'type': 'none', 90 'include_dirs': ['.'],
158 'direct_dependent_settings': { 91 'sources': [
159 'defines': [ 92 'enc/alpha.c',
160 'ENABLE_WEBP', 93 'enc/analysis.c',
161 ], 94 'enc/backward_references.c',
162 }, 95 'enc/config.c',
163 'link_settings': { 96 'enc/cost.c',
164 'libraries': [ 97 'enc/filter.c',
165 # Check for presence of webpdemux library, use it if present. 98 'enc/frame.c',
166 '<!(python <(DEPTH)/tools/compile_test/compile_test.py ' 99 'enc/histogram.c',
167 '--code "int main() { return 0; }" ' 100 'enc/iterator.c',
168 '--run-linker ' 101 'enc/layer.c',
169 '--on-success "-lwebp -lwebpdemux" ' 102 'enc/picture.c',
170 '--on-failure "-lwebp" ' 103 'enc/quant.c',
171 '-- -lwebpdemux)', 104 'enc/syntax.c',
172 ], 105 'enc/token.c',
173 }, 106 'enc/tree.c',
174 } 107 'enc/vp8l.c',
108 'enc/webpenc.c',
175 ], 109 ],
176 }], 110 },
111 {
112 'target_name': 'libwebp_utils',
113 'type': 'static_library',
114 'include_dirs': ['.'],
115 'sources': [
116 'utils/bit_reader.c',
117 'utils/bit_writer.c',
118 'utils/color_cache.c',
119 'utils/filters.c',
120 'utils/huffman.c',
121 'utils/huffman_encode.c',
122 'utils/quant_levels.c',
123 'utils/quant_levels_dec.c',
124 'utils/rescaler.c',
125 'utils/thread.c',
126 'utils/utils.c',
127 ],
128 },
129 {
130 'target_name': 'libwebp',
131 'type': 'none',
132 'dependencies' : [
133 'libwebp_dec',
134 'libwebp_demux',
135 'libwebp_dsp',
136 'libwebp_dsp_neon',
137 'libwebp_enc',
138 'libwebp_utils',
139 ],
140 'direct_dependent_settings': {
141 'include_dirs': ['.'],
142 },
143 'conditions': [
144 ['OS!="win"', {'product_name': 'webp'}],
145 ],
146 },
177 ], 147 ],
178 } 148 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698