benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 1 | # Description: |
| 2 | # Skia graphics library. |
| 3 | # |
| 4 | # Definitions for Google BUILD file. |
| 5 | |
| 6 | exports_files(["BUILD.public"]) |
| 7 | |
| 8 | # Platform-independent SRCS |
| 9 | SRCS = glob( |
| 10 | [ |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 11 | "include/private/*.h", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 12 | "google/*.cpp", |
| 13 | "src/c/*.cpp", |
| 14 | "src/core/*.cpp", |
| 15 | "src/device/*.cpp", |
| 16 | "src/doc/*.cpp", |
| 17 | "src/effects/*.cpp", |
| 18 | "src/effects/gradients/*.cpp", |
| 19 | "src/image/*.cpp", |
| 20 | "src/images/*.cpp", |
| 21 | "src/lazy/*.cpp", |
| 22 | "src/pathops/*.cpp", |
| 23 | "src/pdf/*.cpp", |
| 24 | "src/pipe/*.cpp", |
| 25 | "src/sfnt/*.cpp", |
| 26 | "src/utils/*.cpp", |
| 27 | "src/gpu/*.cpp", |
| 28 | "src/gpu/effects/*.cpp", |
| 29 | "src/gpu/gl/*.cpp", |
| 30 | "src/gpu/gl/builders/*.cpp", |
| 31 | "src/gpu/gl/debug/*.cpp", |
| 32 | "src/gpu/gl/glx/*.cpp", |
| 33 | "src/opts/opts_check_x86.cpp", |
| 34 | "src/opts/*SSE2*.cpp", |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 35 | "src/opts/*sse2*.cpp", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 36 | "src/opts/SkTextureCompression_opts_none.cpp", |
| 37 | |
| 38 | # TODO(mtklein): might be more maintainable with a blacklist instead? |
| 39 | "src/ports/SkBarriers_x86.cpp", |
| 40 | "src/ports/SkDebug_stdio.cpp", |
| 41 | "src/ports/SkDiscardableMemory_none.cpp", |
| 42 | "src/ports/SkFontHost_linux.cpp", |
| 43 | "src/ports/SkFontHost_FreeType.cpp", |
| 44 | "src/ports/SkFontHost_FreeType_common.cpp", |
| 45 | "src/ports/SkGlobalInitialization_default.cpp", |
| 46 | "src/ports/SkImageGenerator_skia.cpp", |
| 47 | "src/ports/SkMemory_malloc.cpp", |
| 48 | "src/ports/SkMutex_pthread.h", |
| 49 | "src/ports/SkOSFile_posix.cpp", |
| 50 | "src/ports/SkOSFile_stdio.cpp", |
| 51 | "src/ports/SkTLS_pthread.cpp", |
| 52 | "src/ports/SkTime_Unix.cpp", |
| 53 | |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 54 | # Third Party |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 55 | "third_party/etc1/*.cpp", |
| 56 | "third_party/ktx/*.cpp", |
| 57 | ], |
| 58 | exclude = [ |
| 59 | "src/pdf/SkPDFFont.cpp", # Wrapped by google/SkPDFFont_sfntly.cpp |
| 60 | "src/gpu/gl/GrGLDefaultInterface_none.cpp", |
| 61 | "src/gpu/gl/GrGLCreateNativeInterface_none.cpp", |
| 62 | # TODO(mtklein): files below here probably want upstream fixes |
| 63 | "src/utils/SkThreadUtils_pthread_mach.cpp", # Mac-only. Move to ports? |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 64 | # Non-Mac-non-Linux. Move to ports? |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 65 | "src/utils/SkThreadUtils_pthread_other.cpp", |
| 66 | "src/utils/SkThreadUtils_win.cpp", # Windows-only. Move to ports? |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 67 | "src/doc/*_XPS.cpp", # Windows-only. |
| 68 | "src/doc/SkDocument_PDF_None.cpp", # We use SkDocument_PDF.cpp. |
| 69 | ], |
| 70 | ) |
| 71 | |
| 72 | SRCS_SSSE3 = glob( |
| 73 | [ |
| 74 | "src/opts/*SSSE3*.cpp", |
| 75 | "src/opts/*ssse3*.cpp", |
| 76 | ], |
| 77 | ) |
| 78 | |
| 79 | SRCS_SSE4 = glob( |
| 80 | [ |
| 81 | "src/opts/*SSE4*.cpp", |
| 82 | "src/opts/*sse4*.cpp", |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 83 | ], |
| 84 | ) |
| 85 | |
| 86 | HDRS = glob( |
| 87 | [ |
| 88 | "include/**/*.h", |
| 89 | ], |
mtklein | d55d13a | 2015-08-18 08:51:49 -0700 | [diff] [blame] | 90 | exclude = [ |
| 91 | "include/animator/*.h", |
| 92 | "include/private/*.h", |
| 93 | ], |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 94 | ) |
| 95 | |
| 96 | # Includes needed by Skia implementation. Not public includes. |
| 97 | INCLUDES = [ |
benjaminwagner | 787ca87 | 2015-08-17 12:58:10 -0700 | [diff] [blame] | 98 | "include/c", |
| 99 | "include/codec", |
| 100 | "include/config", |
| 101 | "include/core", |
| 102 | "include/device", |
| 103 | "include/effects", |
| 104 | "include/gpu", |
| 105 | "include/images", |
| 106 | "include/pathops", |
| 107 | "include/pdf", |
| 108 | "include/pipe", |
| 109 | "include/ports", |
| 110 | "include/private", |
| 111 | "include/utils", |
| 112 | "include/views", |
| 113 | "include/xml", |
| 114 | "src/core", |
| 115 | "src/doc", |
| 116 | "src/gpu", |
| 117 | "src/image", |
| 118 | "src/lazy", |
| 119 | "src/opts", |
| 120 | "src/pdf", |
| 121 | "src/ports", |
| 122 | "src/sfnt", |
| 123 | "src/utils", |
| 124 | "third_party/etc1", |
| 125 | "third_party/ktx", |
| 126 | ] |
| 127 | |
| 128 | COPTS = [ |
| 129 | "-Wno-deprecated-declarations", # Internal use of deprecated methods. :( |
| 130 | "-Wno-implicit-fallthrough", # Some intentional fallthrough. |
| 131 | ] |
| 132 | |
| 133 | DEFINES = [ |
| 134 | # It'd be nice for fastbuild, dbg -> SK_DEBUG, opt -> SK_RELEASE. |
| 135 | "SK_RELEASE", |
| 136 | # Chrome DEFINES. |
| 137 | "SK_USE_FLOATBITS", |
| 138 | "SK_USE_FREETYPE_EMBOLDEN", |
| 139 | # Turn on a few Google3-specific build fixes. |
| 140 | "GOOGLE3", |
| 141 | "SK_BUILD_FOR_UNIX", |
| 142 | "SK_SAMPLES_FOR_X", |
| 143 | ] |
| 144 | |
| 145 | LINKOPTS = ["-ldl"] |