| load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| load("@rules_cc//cc:cc_binary.bzl", "cc_binary") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| cc_library( |
| name = "libhothd", |
| srcs = [ |
| "asset.cpp", |
| "ec_util.cpp", |
| "firmware_mtd_updater.cpp", |
| "firmware_spi_updater.cpp", |
| "fs.cpp", |
| "host_command.cpp", |
| "hoth.cpp", |
| "hoth_state.cpp", |
| "libhoth_spi.cpp", |
| "libhoth_usb.cpp", |
| "libusb.cpp", |
| "libusb_impl.cpp", |
| "log_collector_util.cpp", |
| "message_file.cpp", |
| "message_hoth_usb.cpp", |
| "message_spi.cpp", |
| "message_util.cpp", |
| "mtd_util.cpp", |
| "payload_update.cpp", |
| "sys.cpp", |
| "usb_util.cpp", |
| "version.cpp", |
| ], |
| hdrs = glob([ |
| "*.hpp", |
| "google3/**/*.h", |
| ]), |
| copts = [ |
| "-std=c++23", |
| "-DHAVE_USB", |
| "-DHAVE_SPI", |
| "-DOMIT_VARIABLE_ARRAYS", |
| "-Wno-pedantic", |
| "-I$(BINDIR)/external/hothd+", |
| "-I$(BINDIR)/external/hothd", |
| "-I$(BINDIR)", |
| ], |
| deps = [ |
| "//xyz/openbmc_project/Control/Hoth:hoth_dbus", |
| "@abseil-cpp//absl/cleanup", |
| "@fmt//:fmt", |
| "@libhoth//:libhoth", |
| "@libhoth//:libusb", |
| "@phosphor_dbus_interfaces//:phosphor_dbus_interfaces", |
| "@sdbusplus//:sdbusplus", |
| "@sdeventplus//:sdeventplus", |
| "@stdplus//:stdplus", |
| "@systemd//:libsystemd", |
| ], |
| visibility = ["//visibility:public"], |
| ) |
| |
| cc_binary( |
| name = "hothd", |
| srcs = ["main.cpp"], |
| copts = [ |
| "-std=c++23", |
| "-DHAVE_USB", |
| "-DHAVE_SPI", |
| "-DOMIT_VARIABLE_ARRAYS", |
| "-Wno-pedantic", |
| "-I$(BINDIR)/external/hothd+", |
| "-I$(BINDIR)/external/hothd", |
| "-I$(BINDIR)", |
| ], |
| deps = [ |
| ":libhothd", |
| ], |
| visibility = ["//visibility:public"], |
| ) |
| |
| filegroup( |
| name = "tools", |
| srcs = [ |
| "//tools:hoth_updater", |
| "//tools:payload_update", |
| ], |
| visibility = ["//visibility:public"], |
| ) |