Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # This GYP file stores the dependencies necessary to build Skia on the Android | 1 # This GYP file stores the dependencies necessary to build Skia on the Chrome OS |
| 2 # platform. The OS doesn't provide many stable libraries as part of the | 2 # 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. | 3 # distribution so we have to build a few of them ourselves. |
| 4 # | |
| 5 # 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 | |
| 7 # 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 | |
| 9 # tested. | |
| 10 | 4 |
| 11 { | 5 { |
| 12 'variables': { | 6 'variables': { |
| 13 'skia_warnings_as_errors': 0, | 7 'skia_warnings_as_errors': 0, |
| 14 }, | 8 }, |
| 15 'targets': [ | 9 'targets': [ |
| 16 { | 10 { |
| 17 'target_name': 'cpu_features', | |
| 18 'type': 'static_library', | |
| 19 'direct_dependent_settings': { | |
| 20 'include_dirs': [ | |
| 21 '../third_party/cpufeatures', | |
| 22 ], | |
| 23 }, | |
| 24 'sources': [ | |
| 25 '../third_party/cpufeatures/cpu-features.c', | |
| 26 '../third_party/cpufeatures/cpu-features.h', | |
| 27 ], | |
| 28 }, | |
| 29 { | |
| 30 'target_name': 'expat', | |
| 31 'type': 'static_library', | |
| 32 'sources': [ | |
| 33 '../third_party/externals/expat/lib/xmlparse.c', | |
| 34 '../third_party/externals/expat/lib/xmlrole.c', | |
| 35 '../third_party/externals/expat/lib/xmltok.c', | |
| 36 ], | |
| 37 'include_dirs': [ | |
| 38 '../third_party/externals/expat', | |
| 39 '../third_party/externals/expat/lib', | |
| 40 ], | |
| 41 'cflags': [ | |
| 42 '-Wall', | |
| 43 '-Wmissing-prototypes', | |
| 44 '-Wstrict-prototypes', | |
| 45 '-fexceptions', | |
| 46 '-DHAVE_EXPAT_CONFIG_H', | |
| 47 ], | |
| 48 'direct_dependent_settings': { | |
| 49 'include_dirs': [ | |
| 50 '../third_party/externals/expat/lib', # For expat.h | |
| 51 ], | |
| 52 } | |
| 53 }, | |
| 54 { | |
| 55 'target_name': 'gif', | 11 'target_name': 'gif', |
|
tfarina
2013/07/13 03:56:57
how this is compiling on Linux?
$ ninja -C out/De
djsollen
2013/07/15 11:59:44
This file is only related to ChromeOS. For that s
| |
| 56 'type': 'static_library', | 12 'type': 'static_library', |
| 57 'sources': [ | 13 'sources': [ |
| 58 '../third_party/externals/gif/dgif_lib.c', | 14 '../third_party/externals/gif/dgif_lib.c', |
| 59 '../third_party/externals/gif/gifalloc.c', | 15 '../third_party/externals/gif/gifalloc.c', |
| 60 '../third_party/externals/gif/gif_err.c', | 16 '../third_party/externals/gif/gif_err.c', |
| 61 ], | 17 ], |
| 62 'include_dirs': [ | 18 'include_dirs': [ |
| 63 '../third_party/externals/gif', | 19 '../third_party/externals/gif', |
| 64 ], | 20 ], |
| 65 'cflags': [ | 21 'cflags': [ |
| 66 '-Wno-format', | 22 '-Wno-format', |
| 67 '-DHAVE_CONFIG_H', | 23 '-DHAVE_CONFIG_H', |
| 68 ], | 24 ], |
| 69 'cflags!': [ | 25 'cflags!': [ |
| 70 '-Wall', | 26 '-Wall', |
| 71 ], | 27 ], |
| 72 'direct_dependent_settings': { | 28 'direct_dependent_settings': { |
| 73 'include_dirs': [ | 29 'include_dirs': [ |
| 74 '../third_party/externals/gif', | 30 '../third_party/externals/gif', |
| 75 ], | 31 ], |
| 76 } | 32 } |
| 77 }, | 33 }, |
| 78 { | |
| 79 'target_name': 'png', | |
| 80 'type': 'static_library', | |
| 81 'sources': [ | |
| 82 '../third_party/externals/png/png.c', | |
| 83 '../third_party/externals/png/pngerror.c', | |
| 84 '../third_party/externals/png/pnggccrd.c', | |
| 85 '../third_party/externals/png/pngget.c', | |
| 86 '../third_party/externals/png/pngmem.c', | |
| 87 '../third_party/externals/png/pngpread.c', | |
| 88 '../third_party/externals/png/pngread.c', | |
| 89 '../third_party/externals/png/pngrio.c', | |
| 90 '../third_party/externals/png/pngrtran.c', | |
| 91 '../third_party/externals/png/pngrutil.c', | |
| 92 '../third_party/externals/png/pngset.c', | |
| 93 '../third_party/externals/png/pngtrans.c', | |
| 94 '../third_party/externals/png/pngvcrd.c', | |
| 95 '../third_party/externals/png/pngwio.c', | |
| 96 '../third_party/externals/png/pngwrite.c', | |
| 97 '../third_party/externals/png/pngwtran.c', | |
| 98 '../third_party/externals/png/pngwutil.c', | |
| 99 ], | |
| 100 'include_dirs': [ | |
| 101 '../third_party/externals/png', | |
| 102 ], | |
| 103 'cflags': [ | |
| 104 '-fvisibility=hidden', | |
| 105 ], | |
| 106 'cflags!': [ | |
| 107 '-Wall', | |
| 108 ], | |
| 109 'link_settings': { | |
| 110 'libraries': [ | |
| 111 '-lz', | |
| 112 ], | |
| 113 }, | |
| 114 'direct_dependent_settings': { | |
| 115 'include_dirs': [ | |
| 116 '../third_party/externals/png', | |
| 117 ], | |
| 118 } | |
| 119 }, | |
| 120 { | |
| 121 'target_name': 'jpeg', | |
| 122 'type': 'static_library', | |
| 123 'sources': [ | |
| 124 '../third_party/externals/jpeg/jcapimin.c', | |
| 125 '../third_party/externals/jpeg/jcapistd.c', | |
| 126 '../third_party/externals/jpeg/jccoefct.c', | |
| 127 '../third_party/externals/jpeg/jccolor.c', | |
| 128 '../third_party/externals/jpeg/jcdctmgr.c', | |
| 129 '../third_party/externals/jpeg/jchuff.c', | |
| 130 '../third_party/externals/jpeg/jcinit.c', | |
| 131 '../third_party/externals/jpeg/jcmainct.c', | |
| 132 '../third_party/externals/jpeg/jcmarker.c', | |
| 133 '../third_party/externals/jpeg/jcmaster.c', | |
| 134 '../third_party/externals/jpeg/jcomapi.c', | |
| 135 '../third_party/externals/jpeg/jcparam.c', | |
| 136 '../third_party/externals/jpeg/jcphuff.c', | |
| 137 '../third_party/externals/jpeg/jcprepct.c', | |
| 138 '../third_party/externals/jpeg/jcsample.c', | |
| 139 '../third_party/externals/jpeg/jctrans.c', | |
| 140 '../third_party/externals/jpeg/jdapimin.c', | |
| 141 '../third_party/externals/jpeg/jdapistd.c', | |
| 142 '../third_party/externals/jpeg/jdatadst.c', | |
| 143 '../third_party/externals/jpeg/jdatasrc.c', | |
| 144 '../third_party/externals/jpeg/jdcoefct.c', | |
| 145 '../third_party/externals/jpeg/jdcolor.c', | |
| 146 '../third_party/externals/jpeg/jddctmgr.c', | |
| 147 '../third_party/externals/jpeg/jdhuff.c', | |
| 148 '../third_party/externals/jpeg/jdinput.c', | |
| 149 '../third_party/externals/jpeg/jdmainct.c', | |
| 150 '../third_party/externals/jpeg/jdmarker.c', | |
| 151 '../third_party/externals/jpeg/jdmaster.c', | |
| 152 '../third_party/externals/jpeg/jdmerge.c', | |
| 153 '../third_party/externals/jpeg/jdphuff.c', | |
| 154 '../third_party/externals/jpeg/jdpostct.c', | |
| 155 '../third_party/externals/jpeg/jdsample.c', | |
| 156 '../third_party/externals/jpeg/jdtrans.c', | |
| 157 '../third_party/externals/jpeg/jerror.c', | |
| 158 '../third_party/externals/jpeg/jfdctflt.c', | |
| 159 '../third_party/externals/jpeg/jfdctfst.c', | |
| 160 '../third_party/externals/jpeg/jfdctint.c', | |
| 161 '../third_party/externals/jpeg/jidctflt.c', | |
| 162 '../third_party/externals/jpeg/jidctfst.c', | |
| 163 '../third_party/externals/jpeg/jidctint.c', | |
| 164 '../third_party/externals/jpeg/jidctred.c', | |
| 165 '../third_party/externals/jpeg/jquant1.c', | |
| 166 '../third_party/externals/jpeg/jquant2.c', | |
| 167 '../third_party/externals/jpeg/jutils.c', | |
| 168 '../third_party/externals/jpeg/jmemmgr.c', | |
| 169 '../third_party/externals/jpeg/jmem-android.c', # ashmem is also availab le | |
| 170 ], | |
| 171 'include_dirs': [ | |
| 172 '../third_party/externals/jpeg', | |
| 173 ], | |
| 174 'cflags': [ | |
| 175 '-fvisibility=hidden', | |
| 176 '-DAVOID_TABLES', | |
| 177 '-O3', | |
| 178 '-fstrict-aliasing', | |
| 179 '-fprefetch-loop-arrays', | |
| 180 '-DANDROID_TILE_BASED_DECODE', | |
| 181 ], | |
| 182 'cflags!': [ | |
| 183 '-Wall', | |
| 184 ], | |
| 185 'direct_dependent_settings': { | |
| 186 'include_dirs': [ | |
| 187 '../third_party/externals/jpeg', | |
| 188 ], | |
| 189 } | |
| 190 }, | |
| 191 { | |
| 192 # This target is a dependency for all console-type Skia applications which | |
| 193 # will run on Android. Since Android requires us to load native code in | |
| 194 # shared libraries, we need a common entry point to wrap around main(). | |
| 195 # Here we also change the type of all would-be executables to be shared | |
| 196 # libraries. The alternative would be to introduce a condition in every | |
| 197 # executable target which changes to a shared library if the target OS is | |
| 198 # Android. This is nicer because the switch is in one place. | |
| 199 'target_name': 'Android_EntryPoint', | |
| 200 'type': 'static_library', | |
| 201 'direct_dependent_settings': { | |
| 202 'target_conditions': [ | |
| 203 # '_type' is an 'automatic variable' which is defined for any | |
| 204 # target which defines a key-value pair with 'type' as the key (so, | |
| 205 # all of them). Conditionals inside 'target_conditions' are evaluated | |
| 206 # *after* all other definitions and conditionals are evaluated, so | |
| 207 # we're guaranteed that '_type' will be defined when we get here. | |
| 208 # For more info, see: | |
| 209 # - http://code.google.com/p/gyp/wiki/InputFormatReference#Variables | |
| 210 # - http://codereview.appspot.com/6353065/ | |
| 211 ['_type == "executable"', { | |
| 212 'type': 'shared_library', | |
| 213 }], | |
| 214 ], | |
| 215 }, | |
| 216 'sources': [ | |
| 217 '../app/jni/com_skia_SkiaIntentService.cpp', | |
| 218 ], | |
| 219 }, | |
| 220 { | |
| 221 # This target is a dependency for Skia Sample application which runs on | |
| 222 # Android. Since Android requires us to load native code in shared | |
| 223 # libraries, we need a common entry point to wrap around main(). Here | |
| 224 # we also change the type of all would-be executables to be shared | |
| 225 # libraries. The alternative would be to introduce a condition in every | |
| 226 # executable target which changes to a shared library if the target OS is | |
| 227 # Android. This is nicer because the switch is in one place. | |
| 228 'target_name': 'Android_SampleApp', | |
| 229 'type': 'static_library', | |
| 230 'direct_dependent_settings': { | |
| 231 'target_conditions': [ | |
| 232 # '_type' is an 'automatic variable' which is defined for any | |
| 233 # target which defines a key-value pair with 'type' as the key (so, | |
| 234 # all of them). Conditionals inside 'target_conditions' are evaluated | |
| 235 # *after* all other definitions and conditionals are evaluated, so | |
| 236 # we're guaranteed that '_type' will be defined when we get here. | |
| 237 # For more info, see: | |
| 238 # - http://code.google.com/p/gyp/wiki/InputFormatReference#Variables | |
| 239 # - http://codereview.appspot.com/6353065/ | |
| 240 ['_type == "executable"', { | |
| 241 'type': 'shared_library', | |
| 242 }], | |
| 243 ], | |
| 244 'sources': [ | |
| 245 '../app/jni/com_skia_SkiaSampleRenderer.cpp', | |
| 246 ], | |
| 247 }, | |
| 248 | |
| 249 }, | |
| 250 ] | 34 ] |
| 251 } | 35 } |
| OLD | NEW |