2020-03-12 13:23:57 +01:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_binary")
|
2018-08-18 01:48:35 +02:00
|
|
|
load("//tools/project:build_defs.bzl", "project")
|
|
|
|
|
2022-01-13 01:55:06 +01:00
|
|
|
package(features = ["layering_check"])
|
|
|
|
|
2018-08-18 01:48:35 +02:00
|
|
|
project()
|
|
|
|
|
2018-01-20 20:04:27 +01:00
|
|
|
cc_binary(
|
|
|
|
name = "toxic",
|
2020-03-30 14:35:34 +02:00
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"src/*.c",
|
|
|
|
"src/*.h",
|
|
|
|
],
|
|
|
|
exclude = ["src/video*"],
|
|
|
|
) + select({
|
|
|
|
"//tools/config:linux": glob(["src/video*"]),
|
|
|
|
"//tools/config:osx": [],
|
|
|
|
}),
|
2018-01-20 20:04:27 +01:00
|
|
|
copts = [
|
2020-04-17 21:34:27 +02:00
|
|
|
"-std=gnu99",
|
2018-01-20 20:04:27 +01:00
|
|
|
"-DAUDIO",
|
2021-12-10 18:52:43 +01:00
|
|
|
"-DGAMES",
|
2018-01-20 20:04:27 +01:00
|
|
|
"-DPACKAGE_DATADIR='\"data\"'",
|
|
|
|
"-DPYTHON",
|
2018-09-08 19:23:07 +02:00
|
|
|
"-DQRCODE",
|
2020-03-30 14:35:34 +02:00
|
|
|
] + select({
|
|
|
|
"//tools/config:linux": ["-DVIDEO"],
|
|
|
|
"//tools/config:osx": [],
|
|
|
|
}),
|
2018-01-20 20:04:27 +01:00
|
|
|
deps = [
|
|
|
|
"//c-toxcore",
|
|
|
|
"@curl",
|
2018-07-15 17:33:35 +02:00
|
|
|
"@libconfig",
|
2018-01-20 20:04:27 +01:00
|
|
|
"@libqrencode",
|
|
|
|
"@libvpx",
|
2018-08-05 21:17:57 +02:00
|
|
|
"@ncurses",
|
|
|
|
"@openal",
|
2018-01-20 20:04:27 +01:00
|
|
|
"@python3//:python",
|
2020-03-30 14:35:34 +02:00
|
|
|
] + select({
|
|
|
|
"//tools/config:linux": ["@x11"],
|
|
|
|
"//tools/config:osx": [],
|
|
|
|
}),
|
2018-01-20 20:04:27 +01:00
|
|
|
)
|
2021-11-27 00:57:39 +01:00
|
|
|
|
|
|
|
sh_test(
|
|
|
|
name = "toxic_test",
|
2021-12-21 13:22:22 +01:00
|
|
|
size = "small",
|
2021-11-27 00:57:39 +01:00
|
|
|
srcs = [":toxic"],
|
|
|
|
args = ["--help"],
|
|
|
|
)
|