load("@rules_cc//cc:cc_library.bzl", "cc_library")

package(
    default_visibility = [
        "@//:android_cuttlefish",
    ],
)

cc_library(
    name = "libusb",
    srcs = [
        "libusb/core.c",
        "libusb/descriptor.c",
        "libusb/hotplug.c",
        "libusb/io.c",
        "libusb/sync.c",
        "libusb/strerror.c",
        "libusb/os/events_posix.c",
        "libusb/os/linux_usbfs.c",
        "libusb/os/threads_posix.c",
        "libusb/os/linux_netlink.c",
    ],
    includes = [
        ".",
        "libusb",
        "libusb/os",
        "linux",
    ],
    hdrs = [
        "libusb/libusb.h",
        "libusb/libusbi.h",
        "libusb/os/events_posix.h",
        "libusb/os/linux_usbfs.h",
        "libusb/os/threads_posix.h",
        "libusb/version.h",
        "libusb/version_nano.h",
        "linux/config.h",
    ],
    copts = [
        "-Wno-sign-compare",
        "-Wno-switch",
        "-Wno-unused-function",
        "-Wno-unused-parameter",
        "-DENABLE_LOGGING=1",
    ],
)
