|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 EXPORTS += [ |
|
8 'chromium_types.h', |
|
9 'ycbcr_to_rgb565.h', |
|
10 'YCbCrUtils.h', |
|
11 'yuv_convert.h', |
|
12 'yuv_row.h', |
|
13 ] |
|
14 |
|
15 UNIFIED_SOURCES += [ |
|
16 'ycbcr_to_rgb565.cpp', |
|
17 'YCbCrUtils.cpp', |
|
18 'yuv_convert.cpp', |
|
19 'yuv_row_c.cpp', |
|
20 'yuv_row_table.cpp', |
|
21 ] |
|
22 |
|
23 if CONFIG['INTEL_ARCHITECTURE']: |
|
24 # These files use MMX and SSE2 intrinsics, so they need special compile flags |
|
25 # on some compilers. |
|
26 SOURCES += ['yuv_convert_sse2.cpp'] |
|
27 SOURCES['yuv_convert_sse2.cpp'].flags += CONFIG['SSE2_FLAGS'] |
|
28 |
|
29 # MSVC doesn't support MMX when targeting AMD64. |
|
30 if CONFIG['_MSC_VER']: |
|
31 if CONFIG['OS_TEST'] != 'x86_64': |
|
32 SOURCES += [ |
|
33 'yuv_convert_mmx.cpp', |
|
34 ] |
|
35 else: |
|
36 SOURCES += ['yuv_convert_mmx.cpp'] |
|
37 SOURCES['yuv_convert_mmx.cpp'].flags += CONFIG['MMX_FLAGS'] |
|
38 |
|
39 if CONFIG['_MSC_VER']: |
|
40 if CONFIG['OS_TEST'] == 'x86_64': |
|
41 if CONFIG['_MSC_VER'] == '1400': |
|
42 # VC8 doesn't support some SSE2 built-in functions |
|
43 SOURCES += [ |
|
44 'yuv_row_win.cpp', |
|
45 ] |
|
46 else: |
|
47 SOURCES += [ |
|
48 'yuv_row_win64.cpp', |
|
49 ] |
|
50 else: |
|
51 SOURCES += [ |
|
52 'yuv_row_win.cpp', |
|
53 ] |
|
54 elif CONFIG['OS_ARCH'] in ('Linux', 'SunOS', 'Darwin', 'DragonFly', |
|
55 'FreeBSD', 'NetBSD', 'OpenBSD'): |
|
56 SOURCES += [ |
|
57 'yuv_row_posix.cpp', |
|
58 ] |
|
59 else: |
|
60 SOURCES += [ |
|
61 'yuv_row_other.cpp', |
|
62 ] |
|
63 |
|
64 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['HAVE_ARM_NEON']: |
|
65 SOURCES += [ |
|
66 'yuv_row_arm.s', |
|
67 ] |
|
68 SOURCES += [ |
|
69 'yuv_convert_arm.cpp', |
|
70 ] |
|
71 |
|
72 FINAL_LIBRARY = 'xul' |