OLD | NEW |
1 ################################################################################ | 1 ################################################################################ |
2 # Skylark macros | 2 # Skylark macros |
3 ################################################################################ | 3 ################################################################################ |
4 | 4 |
5 is_bazel = not hasattr(native, "genmpm") | 5 is_bazel = not hasattr(native, "genmpm") |
6 | 6 |
7 def portable_select(select_dict, bazel_condition, default_condition): | 7 def portable_select(select_dict, bazel_condition, default_condition): |
8 """Replaces select() with a Bazel-friendly wrapper. | 8 """Replaces select() with a Bazel-friendly wrapper. |
9 | 9 |
10 Args: | 10 Args: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 Equivalent of glob(srcs.include, exclude=srcs.exclude) | 45 Equivalent of glob(srcs.include, exclude=srcs.exclude) |
46 """ | 46 """ |
47 if hasattr(srcs, 'include'): | 47 if hasattr(srcs, 'include'): |
48 if hasattr(srcs, 'exclude'): | 48 if hasattr(srcs, 'exclude'): |
49 return native.glob(srcs.include, exclude=srcs.exclude) | 49 return native.glob(srcs.include, exclude=srcs.exclude) |
50 else: | 50 else: |
51 return native.glob(srcs.include) | 51 return native.glob(srcs.include) |
52 return [] | 52 return [] |
53 | 53 |
54 ################################################################################ | 54 ################################################################################ |
| 55 ## PRIVATE_HDRS |
| 56 ################################################################################ |
| 57 |
| 58 PRIVATE_HDRS_LIST = [ |
| 59 "include/private/**/*", |
| 60 "src/utils/SkWhitelistChecksums.cpp", |
| 61 ] |
| 62 |
| 63 PRIVATE_HDRS = struct( |
| 64 include = PRIVATE_HDRS_LIST, |
| 65 ) |
| 66 |
| 67 ################################################################################ |
55 ## BASE_SRCS | 68 ## BASE_SRCS |
56 ################################################################################ | 69 ################################################################################ |
57 | 70 |
58 # All platform-independent SRCS. | 71 # All platform-independent SRCS. |
59 BASE_SRCS_ALL = struct( | 72 BASE_SRCS_ALL = struct( |
60 include = [ | 73 include = [ |
61 "include/private/*.h", | |
62 "src/**/*.h", | 74 "src/**/*.h", |
63 "src/**/*.cpp", | 75 "src/**/*.cpp", |
64 | 76 |
65 # Third Party | 77 # Third Party |
66 "third_party/etc1/*.cpp", | 78 "third_party/etc1/*.cpp", |
67 "third_party/etc1/*.h", | 79 "third_party/etc1/*.h", |
68 "third_party/ktx/*.cpp", | 80 "third_party/ktx/*.cpp", |
69 "third_party/ktx/*.h", | 81 "third_party/ktx/*.h", |
70 ], | 82 ], |
71 exclude = [ | 83 exclude = PRIVATE_HDRS_LIST + [ |
72 # Exclude platform-dependent files. | 84 # Exclude platform-dependent files. |
73 "src/android/*", | 85 "src/android/*", |
74 "src/codec/*", | 86 "src/codec/*", |
75 "src/device/xps/*", # Windows-only. Move to ports? | 87 "src/device/xps/*", # Windows-only. Move to ports? |
76 "src/doc/*_XPS.cpp", # Windows-only. Move to ports? | 88 "src/doc/*_XPS.cpp", # Windows-only. Move to ports? |
77 "src/fonts/SkFontMgr_fontconfig.cpp", | 89 "src/fonts/SkFontMgr_fontconfig.cpp", |
78 "src/gpu/gl/android/*", | 90 "src/gpu/gl/android/*", |
79 "src/gpu/gl/egl/*", | 91 "src/gpu/gl/egl/*", |
80 "src/gpu/gl/glfw/*", | 92 "src/gpu/gl/glfw/*", |
81 "src/gpu/gl/glx/*", | 93 "src/gpu/gl/glx/*", |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 ], | 313 ], |
302 ) | 314 ) |
303 | 315 |
304 ################################################################################ | 316 ################################################################################ |
305 ## BASE_HDRS | 317 ## BASE_HDRS |
306 ################################################################################ | 318 ################################################################################ |
307 | 319 |
308 BASE_HDRS = struct( | 320 BASE_HDRS = struct( |
309 include = [ | 321 include = [ |
310 "include/**/*.h", | 322 "include/**/*.h", |
311 "src/utils/SkWhitelistChecksums.cpp", | |
312 ], | 323 ], |
313 exclude = [ | 324 exclude = PRIVATE_HDRS_LIST + [ |
314 "include/private/**/*", | |
315 | |
316 # Not used. | 325 # Not used. |
317 "include/animator/**/*", | 326 "include/animator/**/*", |
318 "include/views/**/*", | 327 "include/views/**/*", |
319 "include/xml/SkBML_WXMLParser.h", | 328 "include/xml/SkBML_WXMLParser.h", |
320 "include/xml/SkBML_XMLParser.h", | 329 "include/xml/SkBML_XMLParser.h", |
321 ], | 330 ], |
322 ) | 331 ) |
323 | 332 |
324 ################################################################################ | 333 ################################################################################ |
325 ## BASE_DEPS | 334 ## BASE_DEPS |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 565 |
557 LINKOPTS_ANDROID = [ | 566 LINKOPTS_ANDROID = [ |
558 "-lEGL", | 567 "-lEGL", |
559 ] | 568 ] |
560 | 569 |
561 LINKOPTS_IOS = [] | 570 LINKOPTS_IOS = [] |
562 | 571 |
563 LINKOPTS_ALL = [ | 572 LINKOPTS_ALL = [ |
564 "-ldl", | 573 "-ldl", |
565 ] | 574 ] |
OLD | NEW |