load("@rules_license//rules:license.bzl", "license") load("@rules_cc//cc:defs.bzl", "cc_library") package( default_applicable_licenses = [":package_license"], default_visibility = ["//visibility:public"], ) license( name = "package_license", package_name = "etherlab-ethercat", ) # GNU General Public License licenses(["restricted"]) exports_files(["LICENSE"]) # Userspace library to communicate with the EtherCAT host. # The kernel-space module is not imported into bcr as it # needs to be compiled and installed on each computer separately. cc_library( name = "ethercat_lib", srcs = glob( [ "lib/*.h", "lib/*.c", ], ) + [ "config.h", # Autogenerated. "globals.h", "master/globals.h", "master/ioctl.h", ], hdrs = [ "include/ecrt.h", ], copts = ["-I./"], includes = ["include"], alwayslink = True, ) cc_library( name = "ethercat_headers", hdrs = [ "include/ecrt.h", ], includes = ["include"], visibility = ["//visibility:public"], ) cc_library( name = "fake_ethercat", srcs = [ "fake_lib/fakeethercat.cpp", ], hdrs = [ "fake_lib/fakeethercat.h", ], visibility = ["//visibility:public"], deps = [ ":ethercat_headers", "@rtipc", ], )