1cc_defaults {
2    name: "piex_default_cflags",
3    cflags: ["-Wall", "-Werror", "-Wsign-compare"],
4}
5
6cc_library_static {
7    name: "libbinary_parse",
8    host_supported: true,
9    defaults: ["piex_default_cflags"],
10    vendor_available: true,
11    srcs: [
12        "src/binary_parse/cached_paged_byte_array.cc",
13        "src/binary_parse/range_checked_byte_ptr.cc",
14    ],
15    target: {
16        windows: {
17            enabled: true,
18        },
19    },
20}
21
22cc_library_static {
23    name: "libimage_type_recognition",
24    host_supported: true,
25    defaults: ["piex_default_cflags"],
26    vendor_available: true,
27    srcs: [
28        "src/image_type_recognition/image_type_recognition_lite.cc",
29    ],
30    static_libs: ["libbinary_parse"],
31    target: {
32        windows: {
33            enabled: true,
34        },
35    },
36}
37
38cc_library_static {
39    name: "libtiff_directory",
40    host_supported: true,
41    defaults: ["piex_default_cflags"],
42    vendor_available: true,
43    srcs: [
44        "src/tiff_directory/tiff_directory.cc",
45    ],
46    static_libs: ["libbinary_parse"],
47    target: {
48        windows: {
49            enabled: true,
50        },
51    },
52}
53
54cc_library_shared {
55    name: "libpiex",
56    host_supported: true,
57    defaults: ["piex_default_cflags"],
58    vendor_available: true,
59    vndk: {
60        enabled: true,
61    },
62    srcs: [
63        "src/tiff_parser.cc",
64        "src/piex.cc",
65    ],
66    export_include_dirs: ["."],
67    static_libs: [
68        "libbinary_parse",
69        "libimage_type_recognition",
70        "libtiff_directory",
71    ],
72    target: {
73        windows: {
74            enabled: true,
75        },
76    },
77}
78