OLD | NEW |
---|---|
1 # Copyright 2015 Google Inc. | |
2 # | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
1 # This GYP file stores the dependencies necessary to build Skia on the Android | 6 # This GYP file stores the dependencies necessary to build Skia on the Android |
2 # platform. The OS doesn't provide many stable libraries as part of the | 7 # platform. The OS doesn't provide many stable libraries as part of the |
3 # distribution so we have to build a few of them ourselves. | 8 # distribution so we have to build a few of them ourselves. |
4 # | 9 # |
5 # NOTE: We tried adding the gyp file to the android/ directory at the root of | 10 # NOTE: We tried adding the gyp file to the android/ directory at the root of |
6 # the Skia repo, but that resulted in the generated makefiles being created | 11 # the Skia repo, but that resulted in the generated makefiles being created |
7 # outside of the out directory. We may be able to move the bulk of this gyp | 12 # outside of the out directory. We may be able to move the bulk of this gyp |
8 # to the /android directory and put a simple shim here, but that has yet to be | 13 # to the /android directory and put a simple shim here, but that has yet to be |
9 # tested. | 14 # tested. |
10 | 15 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 'defines': [ | 53 'defines': [ |
49 'HAVE_EXPAT_CONFIG_H', | 54 'HAVE_EXPAT_CONFIG_H', |
50 ], | 55 ], |
51 'direct_dependent_settings': { | 56 'direct_dependent_settings': { |
52 'include_dirs': [ | 57 'include_dirs': [ |
53 '../third_party/externals/expat/lib', # For expat.h | 58 '../third_party/externals/expat/lib', # For expat.h |
54 ], | 59 ], |
55 } | 60 } |
56 }, | 61 }, |
57 { | 62 { |
58 'target_name': 'gif', | |
59 'type': 'static_library', | |
60 'sources': [ | |
61 '../third_party/externals/gif/dgif_lib.c', | |
62 '../third_party/externals/gif/gifalloc.c', | |
63 '../third_party/externals/gif/gif_err.c', | |
64 ], | |
65 'include_dirs': [ | |
66 '../third_party/externals/gif', | |
67 ], | |
68 'cflags': [ | |
69 '-w', | |
70 '-DHAVE_CONFIG_H', | |
71 ], | |
72 'direct_dependent_settings': { | |
73 'include_dirs': [ | |
74 '../third_party/externals/gif', | |
75 ], | |
76 } | |
77 }, | |
78 { | |
79 'target_name': 'png', | 63 'target_name': 'png', |
80 'type': 'static_library', | 64 'type': 'static_library', |
81 'sources': [ | 65 'sources': [ |
82 '../third_party/externals/png/png.c', | 66 '../third_party/externals/png/png.c', |
83 '../third_party/externals/png/pngerror.c', | 67 '../third_party/externals/png/pngerror.c', |
84 '../third_party/externals/png/pnggccrd.c', | |
85 '../third_party/externals/png/pngget.c', | 68 '../third_party/externals/png/pngget.c', |
86 '../third_party/externals/png/pngmem.c', | 69 '../third_party/externals/png/pngmem.c', |
87 '../third_party/externals/png/pngpread.c', | 70 '../third_party/externals/png/pngpread.c', |
88 '../third_party/externals/png/pngread.c', | 71 '../third_party/externals/png/pngread.c', |
89 '../third_party/externals/png/pngrio.c', | 72 '../third_party/externals/png/pngrio.c', |
90 '../third_party/externals/png/pngrtran.c', | 73 '../third_party/externals/png/pngrtran.c', |
91 '../third_party/externals/png/pngrutil.c', | 74 '../third_party/externals/png/pngrutil.c', |
92 '../third_party/externals/png/pngset.c', | 75 '../third_party/externals/png/pngset.c', |
93 '../third_party/externals/png/pngtrans.c', | 76 '../third_party/externals/png/pngtrans.c', |
94 '../third_party/externals/png/pngvcrd.c', | |
95 '../third_party/externals/png/pngwio.c', | 77 '../third_party/externals/png/pngwio.c', |
96 '../third_party/externals/png/pngwrite.c', | 78 '../third_party/externals/png/pngwrite.c', |
97 '../third_party/externals/png/pngwtran.c', | 79 '../third_party/externals/png/pngwtran.c', |
98 '../third_party/externals/png/pngwutil.c', | 80 '../third_party/externals/png/pngwutil.c', |
99 ], | 81 ], |
82 'conditions': [ | |
83 [ 'arm_neon == 1', | |
84 { | |
85 'sources' : [ | |
86 '../third_party/externals/png/arm/arm_init.c', | |
87 '../third_party/externals/png/arm/filter_neon.S', | |
88 '../third_party/externals/png/arm/filter_neon_intrinsics.c', | |
89 ], | |
90 'flags' : [ | |
djsollen
2015/03/27 14:51:22
if you use defines you can instead of flags you ca
scroggo
2015/03/27 14:55:46
I think this should be
'defines': [
'PNG_ARM_NE
msarett
2015/03/27 15:06:55
Done.
| |
91 '-DPNG_ARM_NEON_OPT=2' | |
92 ] | |
93 }, | |
94 ], | |
95 ], | |
100 'include_dirs': [ | 96 'include_dirs': [ |
101 '../third_party/externals/png', | 97 '../third_party/externals/png', |
102 ], | 98 ], |
103 'cflags': [ | 99 'cflags': [ |
104 '-w', | 100 '-w', |
105 '-fvisibility=hidden', | 101 '-fvisibility=hidden', |
106 ], | 102 ], |
107 'link_settings': { | 103 'link_settings': { |
108 'libraries': [ | 104 'libraries': [ |
109 '-lz', | 105 '-lz', |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 '../third_party/externals/jpeg/jdsample.c', | 149 '../third_party/externals/jpeg/jdsample.c', |
154 '../third_party/externals/jpeg/jdtrans.c', | 150 '../third_party/externals/jpeg/jdtrans.c', |
155 '../third_party/externals/jpeg/jerror.c', | 151 '../third_party/externals/jpeg/jerror.c', |
156 '../third_party/externals/jpeg/jfdctflt.c', | 152 '../third_party/externals/jpeg/jfdctflt.c', |
157 '../third_party/externals/jpeg/jfdctfst.c', | 153 '../third_party/externals/jpeg/jfdctfst.c', |
158 '../third_party/externals/jpeg/jfdctint.c', | 154 '../third_party/externals/jpeg/jfdctint.c', |
159 '../third_party/externals/jpeg/jidctflt.c', | 155 '../third_party/externals/jpeg/jidctflt.c', |
160 '../third_party/externals/jpeg/jidctfst.c', | 156 '../third_party/externals/jpeg/jidctfst.c', |
161 '../third_party/externals/jpeg/jidctint.c', | 157 '../third_party/externals/jpeg/jidctint.c', |
162 '../third_party/externals/jpeg/jidctred.c', | 158 '../third_party/externals/jpeg/jidctred.c', |
159 '../third_party/externals/jpeg/jmem-android.c', | |
160 '../third_party/externals/jpeg/jmemmgr.c', | |
163 '../third_party/externals/jpeg/jquant1.c', | 161 '../third_party/externals/jpeg/jquant1.c', |
164 '../third_party/externals/jpeg/jquant2.c', | 162 '../third_party/externals/jpeg/jquant2.c', |
165 '../third_party/externals/jpeg/jutils.c', | 163 '../third_party/externals/jpeg/jutils.c', |
166 '../third_party/externals/jpeg/jmemmgr.c', | 164 ], |
167 '../third_party/externals/jpeg/jmem-android.c', # ashmem is also availab le | 165 'conditions': [ |
166 [ 'arm_neon == 1', | |
167 { | |
168 'sources' : [ | |
169 '../third_party/externals/jpeg/armv6_idct.S', | |
170 '../third_party/externals/jpeg/jsimd_arm_neon.S', | |
171 '../third_party/externals/jpeg/jsimd_neon.c', | |
172 ], | |
173 'flags' : [ | |
174 '-DNV_ARM_NEON' | |
175 ] | |
176 }, | |
177 ], | |
178 [ 'skia_arch_type == "mips" and mips_dsp == 2', | |
179 { | |
180 'sources' : [ | |
181 '../third_party/externals/jpeg/mips_jidctfst.c', | |
182 '../third_party/externals/jpeg/mips_idct_le.S', | |
183 ], | |
184 'flags' : [ | |
185 '-DANDROID_MIPS_IDCT' | |
186 ] | |
187 }, | |
188 ], | |
189 [ '"x86" in skia_arch_type', | |
190 { | |
191 'sources' : [ | |
192 '../third_party/externals/jpeg/jidctintelsse.c', | |
193 ], | |
194 'flags' : [ | |
195 '-DANDROID_INTELSSE2_IDCT' | |
196 ] | |
197 }, | |
198 ], | |
168 ], | 199 ], |
169 'include_dirs': [ | 200 'include_dirs': [ |
170 '../third_party/externals/jpeg', | 201 '../third_party/externals/jpeg', |
171 ], | 202 ], |
172 'cflags': [ | 203 'cflags': [ |
173 '-w', | 204 '-w', |
174 '-fvisibility=hidden', | 205 '-fvisibility=hidden', |
175 '-DAVOID_TABLES', | 206 '-DAVOID_TABLES', |
176 '-O3', | 207 '-O3', |
177 '-fstrict-aliasing', | 208 '-fstrict-aliasing', |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 }], | 266 }], |
236 ], | 267 ], |
237 'sources': [ | 268 'sources': [ |
238 '../app/jni/com_skia_SkiaSampleRenderer.cpp', | 269 '../app/jni/com_skia_SkiaSampleRenderer.cpp', |
239 ], | 270 ], |
240 }, | 271 }, |
241 | 272 |
242 }, | 273 }, |
243 ] | 274 ] |
244 } | 275 } |
OLD | NEW |