| OLD | NEW |
| 1 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2008 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 Import('env') | 5 Import('env') |
| 6 | 6 |
| 7 env = env.Clone() | 7 env = env.Clone() |
| 8 | 8 |
| 9 env.Prepend( | 9 env.Prepend( |
| 10 CPPPATH = [ | 10 CPPPATH = [ |
| 11 'include', | 11 'include', |
| 12 'include/corecg', | 12 'include/corecg', |
| 13 'corecg', | 13 'corecg', |
| 14 'sgl', | 14 'sgl', |
| 15 'picture', | 15 'picture', |
| 16 '$CHROME_SRC_DIR', | 16 '$CHROME_SRC_DIR', |
| 17 ], | 17 ], |
| 18 ) | 18 ) |
| 19 | 19 |
| 20 env.Append( | 20 env.Append( |
| 21 CPPDEFINES = [ | 21 CPPDEFINES = [ |
| 22 'SKIA_DISABLE_SUPPORT_FOR_DECODERS', | 22 'SKIA_DISABLE_SUPPORT_FOR_DECODERS', |
| 23 ], | 23 ], |
| 24 ) | 24 ) |
| 25 | 25 |
| 26 if env['PLATFORM'] == 'win32': | 26 if env.Bit('windows'): |
| 27 env.Append( | 27 env.Append( |
| 28 CCFLAGS = [ | 28 CCFLAGS = [ |
| 29 '/TP', | 29 '/TP', |
| 30 | 30 |
| 31 '/wd4244', | 31 '/wd4244', |
| 32 '/wd4267', | 32 '/wd4267', |
| 33 '/wd4345', | 33 '/wd4345', |
| 34 '/wd4390', | 34 '/wd4390', |
| 35 '/wd4554', | 35 '/wd4554', |
| 36 '/wd4800', | 36 '/wd4800', |
| 37 ], | 37 ], |
| 38 ) | 38 ) |
| 39 elif env['PLATFORM'] in ('posix', 'darwin'): | 39 elif env.Bit('posix'): |
| 40 env.Append(CCFLAGS = ['-Wno-unused']) | 40 env.Append(CCFLAGS = ['-Wno-unused']) |
| 41 | 41 |
| 42 input_files = [ | 42 input_files = [ |
| 43 'animator/SkTime.cpp', | 43 'animator/SkTime.cpp', |
| 44 'corecg/Sk64.cpp', | 44 'corecg/Sk64.cpp', |
| 45 'corecg/SkBuffer.cpp', | 45 'corecg/SkBuffer.cpp', |
| 46 'corecg/SkChunkAlloc.cpp', | 46 'corecg/SkChunkAlloc.cpp', |
| 47 'corecg/SkCordic.cpp', | 47 'corecg/SkCordic.cpp', |
| 48 'corecg/SkDebug.cpp', | 48 'corecg/SkDebug.cpp', |
| 49 'corecg/SkDebug_stdio.cpp', | 49 'corecg/SkDebug_stdio.cpp', |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 'sgl/SkString.cpp', | 152 'sgl/SkString.cpp', |
| 153 'sgl/SkStroke.cpp', | 153 'sgl/SkStroke.cpp', |
| 154 'sgl/SkStrokerPriv.cpp', | 154 'sgl/SkStrokerPriv.cpp', |
| 155 'sgl/SkTSearch.cpp', | 155 'sgl/SkTSearch.cpp', |
| 156 'sgl/SkTypeface_fake.cpp', | 156 'sgl/SkTypeface_fake.cpp', |
| 157 'sgl/SkUtils.cpp', | 157 'sgl/SkUtils.cpp', |
| 158 'sgl/SkWriter32.cpp', | 158 'sgl/SkWriter32.cpp', |
| 159 'sgl/SkXfermode.cpp', | 159 'sgl/SkXfermode.cpp', |
| 160 ] | 160 ] |
| 161 | 161 |
| 162 if env['PLATFORM'] == 'posix': | 162 if env.Bit('linux'): |
| 163 input_files.append('ext/bitmap_platform_device_linux.cc') | 163 input_files.append('ext/bitmap_platform_device_linux.cc') |
| 164 input_files.append('ext/platform_canvas_linux.cc') | 164 input_files.append('ext/platform_canvas_linux.cc') |
| 165 input_files.append('ext/platform_device_linux.cc') | 165 input_files.append('ext/platform_device_linux.cc') |
| 166 | 166 |
| 167 # On Linux we use Skia to render fonts with FreeType and fontconfig | 167 # On Linux we use Skia to render fonts with FreeType and fontconfig |
| 168 input_files.remove('sgl/SkTypeface_fake.cpp') | 168 input_files.remove('sgl/SkTypeface_fake.cpp') |
| 169 input_files.remove('ports/SkFontHost_none.cpp') | 169 input_files.remove('ports/SkFontHost_none.cpp') |
| 170 input_files.append('sgl/SkTypeface.cpp') | 170 input_files.append('sgl/SkTypeface.cpp') |
| 171 input_files.append('ports/SkFontHost_FreeType.cpp') | 171 input_files.append('ports/SkFontHost_FreeType.cpp') |
| 172 input_files.append('ports/SkFontHost_TrueType_Tables.cpp') | 172 input_files.append('ports/SkFontHost_TrueType_Tables.cpp') |
| 173 input_files.append('ports/SkFontHost_gamma_none.cpp') | 173 input_files.append('ports/SkFontHost_gamma_none.cpp') |
| 174 input_files.append('ports/SkFontHost_fontconfig.cpp') | 174 input_files.append('ports/SkFontHost_fontconfig.cpp') |
| 175 input_files.append('images/SkMMapStream.cpp') | 175 input_files.append('images/SkMMapStream.cpp') |
| 176 | 176 |
| 177 env.Append(CCFLAGS = ['-Wno-unused-function']) | 177 env.Append(CCFLAGS = ['-Wno-unused-function']) |
| 178 | 178 |
| 179 if env['PLATFORM'] in ('darwin', 'posix'): | 179 if env.Bit('posix'): |
| 180 input_files.append('ports/SkThread_pthread.cpp') | 180 input_files.append('ports/SkThread_pthread.cpp') |
| 181 | 181 |
| 182 if env['PLATFORM'] == 'darwin': | 182 if env.Bit('mac'): |
| 183 input_files.append('ext/bitmap_platform_device_mac.cc') | 183 input_files.append('ext/bitmap_platform_device_mac.cc') |
| 184 input_files.append('ext/platform_canvas_mac.cc') | 184 input_files.append('ext/platform_canvas_mac.cc') |
| 185 input_files.append('ext/platform_device_mac.cc') | 185 input_files.append('ext/platform_device_mac.cc') |
| 186 | 186 |
| 187 if env['PLATFORM'] == 'win32': | 187 if env.Bit('windows'): |
| 188 input_files.append('ext/bitmap_platform_device_win.cc') | 188 input_files.append('ext/bitmap_platform_device_win.cc') |
| 189 input_files.append('ext/platform_canvas_win.cc') | 189 input_files.append('ext/platform_canvas_win.cc') |
| 190 input_files.append('ext/platform_device_win.cc') | 190 input_files.append('ext/platform_device_win.cc') |
| 191 input_files.append('ext/skia_utils_win.cc') | 191 input_files.append('ext/skia_utils_win.cc') |
| 192 input_files.append('ext/vector_canvas.cc') | 192 input_files.append('ext/vector_canvas.cc') |
| 193 input_files.append('ext/vector_device.cc') | 193 input_files.append('ext/vector_device.cc') |
| 194 | 194 |
| 195 input_files.append('ports/SkThread_win.cpp') | 195 input_files.append('ports/SkThread_win.cpp') |
| 196 | 196 |
| 197 env_p = env.Clone( | 197 env_p = env.Clone( |
| 198 PCHSTOP = 'SkTypes.h', | 198 PCHSTOP = 'SkTypes.h', |
| 199 PDB = 'vc80.pdb', | 199 PDB = 'vc80.pdb', |
| 200 ) | 200 ) |
| 201 | 201 |
| 202 # TODO(rspangler): This step forces -Zi, but doesn't actually use it. Need to | 202 # TODO(rspangler): This step forces -Zi, but doesn't actually use it. Need to |
| 203 # fix so it doesn't override our -Z7. -Zi also causes vc80.pdb to be created | 203 # fix so it doesn't override our -Z7. -Zi also causes vc80.pdb to be created |
| 204 # in the skia directory. | 204 # in the skia directory. |
| 205 # TODO(bradnelson): This step creates a skia.pch.ib_tag file to be created. | 205 # TODO(bradnelson): This step creates a skia.pch.ib_tag file to be created. |
| 206 # It's a 0-length file so likely harmless. Is this a side effect of having | 206 # It's a 0-length file so likely harmless. Is this a side effect of having |
| 207 # IncrediBuild installed on the build machine? | 207 # IncrediBuild installed on the build machine? |
| 208 pch, obj = env_p.PCH(['skia.pch', 'precompiled.obj'], 'precompiled.cc') | 208 pch, obj = env_p.PCH(['skia.pch', 'precompiled.obj'], 'precompiled.cc') |
| 209 env_p['PCH'] = pch | 209 env_p['PCH'] = pch |
| 210 input_files += [obj] | 210 input_files += [obj] |
| 211 | 211 |
| 212 env.ChromeStaticLibrary('skia', input_files) | 212 env.ChromeStaticLibrary('skia', input_files) |
| 213 | 213 |
| OLD | NEW |