filegroup( name = "k_srcs", srcs = [ "endian/little.c", "stdio/fprintf.c", "stdio/printf.c", "stdio/vfprintf.c", "stdlib/linked_list_allocator.c", "stdlib/memcpy.c", "stdlib/memset.c", "string/itoa.c", ], ) cc_library( name = "k", srcs = [":k_srcs"], hdrs = glob(["include/*.h"]), includes = ["include"], target_compatible_with = [ "@platforms//os:none", ], visibility = ["//visibility:public"], ) # tests cc_library( name = "k_sut", includes = ["."], target_compatible_with = select({ "@platforms//os:none": ["@platforms//:incompatible"], "//conditions:default": [], }), textual_hdrs = [":k_srcs"], ) cc_test( name = "test_endian_little", srcs = [ "endian/test_endian_little.cc", ], deps = [ ":k_sut", "@googletest//:gtest_main", ], ) cc_test( name = "test_linked_list_allocator", srcs = [ "stdlib/test_allocator.hh", "stdlib/test_linked_list_allocator.cc", ], deps = [ ":k_sut", "@googletest//:gtest_main", ], ) cc_test( name = "test_mem", srcs = [ "stdlib/test_mem.cc", ], deps = [ ":k_sut", "@googletest//:gtest_main", ], ) cc_test( name = "test_string", srcs = [ "string/test_string.cc", ], deps = [ ":k_sut", "@googletest//:gtest_main", ], )