cc_defaults {
    name: "pdx_default_transport_compiler_defaults",
    clang: true,
    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
    ],
}

cc_defaults {
    name: "pdx_default_transport_lib_defaults",
    export_include_dirs: ["private"],
    whole_static_libs: ["libpdx"],
}

cc_defaults {
    name: "pdx_use_transport_servicefs",
    export_include_dirs: ["private/servicefs"],
    whole_static_libs: ["libpdx_servicefs", "libservicefs"],
}

cc_defaults {
    name: "pdx_use_transport_uds",
    export_include_dirs: ["private/uds"],
    whole_static_libs: ["libpdx_uds"],
}

cc_library_static {
    name: "libpdx_default_transport",
    defaults: [
        "pdx_default_transport_compiler_defaults",
        "pdx_default_transport_lib_defaults",
        "pdx_use_transport_uds",
    ],
}

cc_binary {
    name: "servicetool",
    defaults: ["pdx_default_transport_compiler_defaults"],
    srcs: [
        "servicetool.cpp",
    ],
    shared_libs: [
        "liblog",
    ],
    static_libs: [
        "libpdx_default_transport",
    ],
}

// Benchmarks.
cc_binary {
    name: "pdx_benchmarks",
    defaults: ["pdx_default_transport_compiler_defaults"],
    srcs: [
        "pdx_benchmarks.cpp",
    ],
    shared_libs: [
        "libbase",
        "libchrome",
        "libcutils",
        "liblog",
        "libutils",
    ],
    static_libs: [
        "libpdx_default_transport",
    ],
}

