1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "external_pdfium_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Artistic
7    //   SPDX-license-identifier-BSD
8    //   SPDX-license-identifier-FTL
9    //   SPDX-license-identifier-MIT
10    //   SPDX-license-identifier-Zlib
11    //   SPDX-license-identifier-libtiff
12    //   legacy_unencumbered
13    default_applicable_licenses: ["external_pdfium_license"],
14}
15
16cc_defaults {
17    name: "pdfium-third-party",
18    defaults: [
19        "pdfium-common"
20    ],
21    visibility: ["//external/pdfium:__subpackages__"],
22}
23
24cc_library_static {
25    name: "libpdfium-third_party-base",
26    defaults: ["pdfium-third-party"],
27    visibility: ["//external/pdfium:__subpackages__"],
28
29    arch: {
30        arm: {
31            cflags: [
32                "-DARCH_CPU_32_BITS",
33                "-DARCH_CPU_ARMEL",
34            ],
35        },
36        arm64: {
37            cflags: [
38                "-DARCH_CPU_64_BITS",
39                "-DARCH_CPU_ARM64",
40            ],
41        },
42        x86: {
43            cflags: [
44                "-DARCH_CPU_32_BITS",
45                "-DARCH_CPU_X86",
46            ],
47        },
48        x86_64: {
49            cflags: [
50                "-DARCH_CPU_64_BITS",
51                "-DARCH_CPU_X86_64",
52            ],
53        },
54    },
55
56    srcs: [
57        "base/debug/*.cc",
58        "base/allocator/partition_allocator/*.cc",
59    ],
60}
61
62cc_library_static {
63    name: "libpdfium-lcms2",
64    defaults: ["pdfium-third-party"],
65
66    cflags: [
67      // cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
68      // library doesn't appear to have this problem.
69      "-Wno-missing-braces",
70
71      // FindPrev() in cmsplugin.c is unused.
72      "-Wno-unused-function",
73    ],
74
75    srcs: [
76        "lcms/src/*.c",
77    ],
78}
79
80cc_library_static {
81    name: "libpdfium-libopenjpeg2",
82    defaults: ["pdfium-third-party"],
83    visibility: ["//cts/hostsidetests/securitybulletin/securityPatch/CVE-2016-8332"],
84
85    exclude_srcs: [
86        "libopenjpeg20/t1_generate_luts.c",
87    ],
88
89    srcs: [
90        "libopenjpeg20/*.c",
91    ],
92}
93
94cc_library_static {
95    name: "libpdfium-agg",
96    defaults: ["pdfium-third-party"],
97
98    cflags: [
99        // calc_butt_cap() in agg_vcgen_stroke.cpp is unused.
100        "-Wno-unused-function",
101    ],
102
103    srcs: [
104        "agg23/*.cpp",
105    ]
106}
107
108cc_library_static {
109    name: "libpdfium-skia_shared",
110    defaults: ["pdfium-third-party"],
111
112    srcs: [
113        "skia_shared/*.cpp",
114    ],
115}
116