load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library") cc_binary( name = "listtopics", srcs = ["listtopics/listtopics.c"], deps = ["@cyclonedds//:ddsc"], ) cc_binary( name = "dynsub", srcs = ["dynsub/dynsub.c"], deps = ["@cyclonedds//:ddsc"], ) genrule( name = "helloworld_idl_gen", srcs = ["helloworld/HelloWorldData.idl"], outs = [ "helloworld/HelloWorldData.c", "helloworld/HelloWorldData.h", ], cmd = "mkdir -p $(@D)/helloworld && $(location @cyclonedds//:idlc) -l c -Wno-implicit-extensibility -o$(@D)/helloworld $(location helloworld/HelloWorldData.idl)", tools = ["@cyclonedds//:idlc"], ) cc_library( name = "helloworld_types", srcs = ["helloworld/HelloWorldData.c"], hdrs = ["helloworld/HelloWorldData.h"], includes = ["helloworld"], deps = ["@cyclonedds//:ddsc"], ) cc_binary( name = "helloworld_publisher", srcs = [ "helloworld/publisher.c", ], deps = [ ":helloworld_types", "@cyclonedds//:ddsc", ], ) cc_binary( name = "helloworld_subscriber", srcs = [ "helloworld/subscriber.c", ], deps = [ ":helloworld_types", "@cyclonedds//:ddsc", ], ) genrule( name = "roundtrip_idl_gen", srcs = ["roundtrip/RoundTrip.idl"], outs = [ "roundtrip/RoundTrip.c", "roundtrip/RoundTrip.h", ], cmd = "mkdir -p $(@D)/roundtrip && $(location @cyclonedds//:idlc) -l c -o$(@D)/roundtrip $(location roundtrip/RoundTrip.idl)", tools = ["@cyclonedds//:idlc"], ) cc_library( name = "roundtrip_types", srcs = ["roundtrip/RoundTrip.c"], hdrs = ["roundtrip/RoundTrip.h"], includes = ["roundtrip"], deps = ["@cyclonedds//:ddsc"], ) cc_binary( name = "roundtrip_ping", srcs = [ "roundtrip/ping.c", ], deps = [ ":roundtrip_types", "@cyclonedds//:ddsc", ], ) cc_binary( name = "roundtrip_pong", srcs = [ "roundtrip/pong.c", ], deps = [ ":roundtrip_types", "@cyclonedds//:ddsc", ], ) genrule( name = "throughput_idl_gen", srcs = ["throughput/Throughput.idl"], outs = [ "throughput/Throughput.c", "throughput/Throughput.h", ], cmd = "mkdir -p $(@D)/throughput && $(location @cyclonedds//:idlc) -l c -o$(@D)/throughput $(location throughput/Throughput.idl)", tools = ["@cyclonedds//:idlc"], ) cc_library( name = "throughput_types", srcs = ["throughput/Throughput.c"], hdrs = ["throughput/Throughput.h"], includes = ["throughput"], deps = ["@cyclonedds//:ddsc"], ) cc_binary( name = "throughput_publisher", srcs = [ "throughput/publisher.c", ], deps = [ ":throughput_types", "@cyclonedds//:ddsc", ], ) cc_binary( name = "throughput_subscriber", srcs = [ "throughput/subscriber.c", ], deps = [ ":throughput_types", "@cyclonedds//:ddsc", ], )