view dowa/BUILD @ 75:ae6a88e6e484

[Deita] Simple DB connection lib.
author June Park <parkjune1995@gmail.com>
date Wed, 31 Dec 2025 11:20:08 -0800
parents 75de5903355c
children 35b1abc37969
line wrap: on
line source

load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
load("@rules_cc//cc:cc_test.bzl", "cc_test")

cc_library(
    name = "stb_ds",
    hdrs = ["stb_ds.h"],
    visibility = ["//visibility:public"],
)

# TODO: Fix so that we can just define in the header instead of defining in the cc_library because this is ass.
cc_library(
  name = "dowa_generic",
  srcs = [
    "d_string.c",
    "d_memory.c",
  ],
  hdrs = [
    "dowa.h",
    "dowa_internal.h",
    "stb_ds.h"
  ],
  visibility = ["//visibility:public"],
)

cc_library(
  name = "dowa",
  srcs = [
    "d_string.c",
    "d_memory.c",
  ],
  hdrs = [
    "dowa.h",
    "dowa_internal.h",
  ],
  copts = ["-DDIRECTORY"],
  visibility = ["//visibility:public"],
)

cc_test(
  name = "dowa_test",
  srcs = ["dowa_test.c"],
  deps = [":dowa"],
  args = [],
  data = glob([
      "test_folder/**",
  ]),
  # TODO: Fix this lmao?
  # copts = ["-fsanitize=address", "-g"],
  # linkopts = ["-fsanitize=address"],
)