load("@rules_cc//cc:cc_binary.bzl", "cc_binary") load("@rules_cc//cc:cc_library.bzl", "cc_library") cc_library( name = "lib/bootgen", srcs = glob(["*.c"]), hdrs = glob(["*.h"]), copts = ["-w"], includes = ["."], deps = ["@openssl//:ssl"], ) alias( name = "libbootgen", actual = ":lib/bootgen", ) cc_binary( name = "bootgen", srcs = glob([ "*.cpp", "*.hpp", "*.hh", ]), copts = [ "-std=c++0x", "-w", ], visibility = ["//visibility:public"], deps = [ ":libbootgen", "@openssl//:ssl", ], ) genrule( name = "bootgen_help", outs = ["bootgen_help.txt"], cmd = "$(execpath :bootgen) -help > $@", tools = [":bootgen"], )