forked from SanderMertens/flecs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WORKSPACE
52 lines (43 loc) · 1.51 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
new_git_repository(
name = "bake",
remote = "git@github.com:SanderMertens/bake.git",
commit = "cfc90745f9daa7b7fba80f229af18cdd5029b066",
shallow_since = "1614835160 -0800",
build_file_content = """
cc_library(
name = "driver-test",
visibility = ["//visibility:public"],
deps = [":util", ":bake"],
srcs = glob(["drivers/test/src/**/*.c", "drivers/test/src/**/*.h"]),
hdrs = glob(["drivers/test/include/**/*.h"]),
includes = ["drivers/test/include"],
)
cc_library(
name = "bake",
visibility = ["//visibility:public"],
deps = [":util"],
srcs = glob(["src/*.c", "src/*.h"]),
hdrs = glob(["include/*.h", "include/bake/*.h"]),
includes = ["include"],
)
cc_library(
name = "util",
visibility = ["//visibility:public"],
defines = ["__BAKE__", "_XOPEN_SOURCE=600"],
linkopts = select({
"@bazel_tools//src/conditions:windows": [],
"//conditions:default": ["-lrt -lpthread -ldl"],
}),
srcs = glob(["util/src/*.c"]) + select({
"@bazel_tools//src/conditions:windows": glob(["util/src/win/*.c"]),
"//conditions:default": glob(["util/src/posix/*.c"]),
}),
hdrs = glob(["util/include/*.h", "util/include/bake-util/*.h"]) + select({
"@bazel_tools//src/conditions:windows": glob(["util/include/bake-util/win/*.h"]),
"//conditions:default": glob(["util/include/bake-util/posix/*.h"]),
}),
includes = ["util/include"],
)
"""
)