# Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Import('env') env = env.Clone() env.Prepend( CPPPATH = [ 'include', 'include/corecg', 'corecg', 'sgl', 'picture', '#..', ], ) env.Append( CPPDEFINES = [ 'SKIA_DISABLE_SUPPORT_FOR_DECODERS', ], ) if env['PLATFORM'] == 'win32': env.Append( CCFLAGS = [ '/TP', '/wd4244', '/wd4267', '/wd4345', '/wd4390', '/wd4554', '/wd4800', ], ) elif env['PLATFORM'] == 'posix': if '-Wall' in env['CCFLAGS']: # We're not responsible for bad warning hygiene in this third party code. env['CCFLAGS'].remove('-Wall') input_files = [ 'animator/SkTime.cpp', 'corecg/Sk64.cpp', 'corecg/SkBuffer.cpp', 'corecg/SkChunkAlloc.cpp', 'corecg/SkCordic.cpp', 'corecg/SkDebug.cpp', 'corecg/SkDebug_stdio.cpp', 'corecg/SkFloat.cpp', 'corecg/SkInterpolator.cpp', 'corecg/SkMath.cpp', 'corecg/SkMatrix.cpp', 'corecg/SkMemory_stdlib.cpp', 'corecg/SkPoint.cpp', 'corecg/SkRect.cpp', 'corecg/SkRegion.cpp', 'effects/Sk1DPathEffect.cpp', 'effects/Sk2DPathEffect.cpp', 'effects/SkAvoidXfermode.cpp', 'effects/SkBlurDrawLooper.cpp', 'effects/SkBlurMask.cpp', 'effects/SkBlurMaskFilter.cpp', 'effects/SkCamera.cpp', 'effects/SkColorFilters.cpp', 'effects/SkColorMatrix.cpp', 'effects/SkColorMatrixFilter.cpp', 'effects/SkCornerPathEffect.cpp', 'effects/SkCullPoints.cpp', 'effects/SkDashPathEffect.cpp', 'effects/SkDiscretePathEffect.cpp', 'effects/SkEmbossMask.cpp', 'effects/SkEmbossMaskFilter.cpp', 'effects/SkGradientShader.cpp', 'effects/SkKernel33MaskFilter.cpp', 'effects/SkLayerRasterizer.cpp', 'effects/SkPaintFlagsDrawFilter.cpp', 'effects/SkPixelXorXfermode.cpp', 'effects/SkShaderExtras.cpp', 'effects/SkTransparentShader.cpp', 'effects/SkUnitMappers.cpp', 'images/SkImageDecoder.cpp', 'images/SkImageRef.cpp', 'images/SkStream.cpp', 'images/SkStream.cpp', 'picture/SkPictureFlat.cpp', 'picture/SkPicturePlayback.cpp', 'picture/SkPictureRecord.cpp', 'ports/SkFontHost_none.cpp', 'ports/SkGlobals_global.cpp', 'ports/SkImageDecoder_Factory.cpp', 'ports/SkOSFile_stdio.cpp', 'sgl/SkAlphaRuns.cpp', 'sgl/SkBitmap.cpp', 'sgl/SkBitmapProcShader.cpp', 'sgl/SkBitmapProcState.cpp', 'sgl/SkBitmapProcState_matrixProcs.cpp', 'sgl/SkBitmapSampler.cpp', 'sgl/SkBitmapShader.cpp', 'sgl/SkBlitRow_D16.cpp', 'sgl/SkBlitRow_D4444.cpp', 'sgl/SkBlitter.cpp', 'sgl/SkBlitter_4444.cpp', 'sgl/SkBlitter_A1.cpp', 'sgl/SkBlitter_A8.cpp', 'sgl/SkBlitter_ARGB32.cpp', 'sgl/SkBlitter_RGB16.cpp', 'sgl/SkBlitter_Sprite.cpp', 'sgl/SkCanvas.cpp', 'sgl/SkColor.cpp', 'sgl/SkColorFilter.cpp', 'sgl/SkColorTable.cpp', 'sgl/SkDeque.cpp', 'sgl/SkDevice.cpp', 'sgl/SkDither.cpp', 'sgl/SkDraw.cpp', 'sgl/SkEdge.cpp', 'sgl/SkFilterProc.cpp', 'sgl/SkFlattenable.cpp', 'sgl/SkGeometry.cpp', 'sgl/SkGlobals.cpp', 'sgl/SkGlyphCache.cpp', 'sgl/SkGraphics.cpp', 'sgl/SkMask.cpp', 'sgl/SkMaskFilter.cpp', 'sgl/SkPackBits.cpp', 'sgl/SkPaint.cpp', 'sgl/SkPath.cpp', 'sgl/SkPathEffect.cpp', 'sgl/SkPathMeasure.cpp', 'sgl/SkPicture.cpp', 'sgl/SkPixelRef.cpp', 'sgl/SkProcSpriteBlitter.cpp', 'sgl/SkPtrRecorder.cpp', 'sgl/SkRasterizer.cpp', 'sgl/SkRefCnt.cpp', 'sgl/SkRegion_path.cpp', 'sgl/SkScalerContext.cpp', 'sgl/SkScan.cpp', 'sgl/SkScan_Antihair.cpp', 'sgl/SkScan_AntiPath.cpp', 'sgl/SkScan_Hairline.cpp', 'sgl/SkScan_Path.cpp', 'sgl/SkShader.cpp', 'sgl/SkSpriteBlitter_ARGB32.cpp', 'sgl/SkSpriteBlitter_RGB16.cpp', 'sgl/SkString.cpp', 'sgl/SkStroke.cpp', 'sgl/SkStrokerPriv.cpp', 'sgl/SkTSearch.cpp', 'sgl/SkTypeface_fake.cpp', 'sgl/SkUtils.cpp', 'sgl/SkWriter32.cpp', 'sgl/SkXfermode.cpp', ] if env['PLATFORM'] in ('darwin', 'posix'): input_files.append('ports/SkThread_pthread.cpp') if env['PLATFORM'] == 'win32': input_files.append('ports/SkThread_win.cpp') env_p = env.Clone( PCHSTOP = 'SkTypes.h', PDB = 'vc80.pdb', ) # TODO(rspangler): This step forces -Zi, but doesn't actually use it. Need to # fix so it doesn't override our -Z7. -Zi also causes vc80.pdb to be created # in the skia directory. # TODO(bradnelson): This step creates a skia.pch.ib_tag file to be created. # It's a 0-length file so likely harmless. Is this a side effect of having # IncrediBuild installed on the build machine? pch, obj = env_p.PCH(['skia.pch', 'precompiled.obj'], 'precompiled.cc') env_p['PCH'] = pch input_files += [obj] env.ChromeStaticLibrary('skia', input_files)