Add BUILD files for all the little tools in the repo.

Also, fix av_test.c, since I broke it last time.
This commit is contained in:
iphydf 2018-01-21 01:05:23 +00:00
parent 822dd2fac2
commit 1cecb6c87a
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
7 changed files with 88 additions and 4 deletions

View File

@ -8,3 +8,20 @@ cc_library(
"//c-toxcore/toxencryptsave:monolith",
],
)
cc_library(
name = "bootstrap_node_packets",
srcs = ["bootstrap_node_packets.c"],
hdrs = ["bootstrap_node_packets.h"],
visibility = ["//c-toxcore/other/bootstrap_daemon:__pkg__"],
deps = ["//c-toxcore/toxcore"],
)
cc_binary(
name = "DHT_bootstrap",
srcs = ["DHT_bootstrap.c"],
deps = [
"//c-toxcore/testing:misc_tools",
"//c-toxcore/toxcore",
],
)

View File

@ -0,0 +1,12 @@
cc_binary(
name = "bootstrap_daemon",
srcs = glob([
"src/*.c",
"src/*.h",
]),
linkopts = ["-lconfig"],
deps = [
"//c-toxcore/other:bootstrap_node_packets",
"//c-toxcore/toxcore",
],
)

27
other/fun/BUILD Normal file
View File

@ -0,0 +1,27 @@
cc_binary(
name = "cracker",
srcs = ["cracker.c"],
deps = [
"//c-toxcore/testing:misc_tools",
"@libsodium",
],
)
cc_binary(
name = "sign",
srcs = ["sign.c"],
deps = [
"//c-toxcore/testing:misc_tools",
"@libsodium",
],
copts = ["-w"],
)
cc_binary(
name = "strkey",
srcs = ["strkey.c"],
deps = [
"@libsodium",
],
copts = ["-w"],
)

4
super_donators/BUILD Normal file
View File

@ -0,0 +1,4 @@
cc_binary(
name = "grencez_tok5",
srcs = ["grencez_tok5.c"],
)

View File

@ -24,6 +24,21 @@ cc_binary(
],
)
cc_binary(
name = "av_test",
srcs = ["av_test.c"],
linkopts = [
"-lportaudio",
"-lopencv_highgui",
"-lopencv_core",
],
deps = [
"//c-toxcore/toxav",
"//c-toxcore/toxav:monolith",
"//c-toxcore/toxcore",
],
)
cc_binary(
name = "irc_syncbot",
srcs = ["irc_syncbot.c"],

View File

@ -241,15 +241,15 @@ static void initialize_tox(Tox **bootstrap, ToxAV **AliceAV, CallControl *AliceC
TOX_ERR_NEW error;
tox_options_set_start_port(opts, 33445);
*bootstrap = tox_new(&opts, &error);
*bootstrap = tox_new(opts, &error);
assert(error == TOX_ERR_NEW_OK);
tox_options_set_start_port(opts, 33455);
Alice = tox_new(&opts, &error);
Alice = tox_new(opts, &error);
assert(error == TOX_ERR_NEW_OK);
tox_options_set_start_port(opts, 33465);
Bob = tox_new(&opts, &error);
Bob = tox_new(opts, &error);
assert(error == TOX_ERR_NEW_OK);
}
@ -440,8 +440,10 @@ int main(int argc, char **argv)
long audio_out_dev_idx = -1;
int32_t audio_frame_duration = 20;
#if 0
// TODO(mannol): Put this to use.
int32_t video_frame_duration = 10;
#endif
/* Parse settings */
CHECK_ARG:
@ -467,6 +469,8 @@ CHECK_ARG:
vf_name = optarg;
goto CHECK_ARG;
#if 0
case 'x': {
char *d;
video_frame_duration = strtol(optarg, &d, 10);
@ -479,6 +483,8 @@ CHECK_ARG:
goto CHECK_ARG;
}
#endif
case 'o': {
char *d;
audio_out_dev_idx = strtol(optarg, &d, 10);

View File

@ -45,5 +45,8 @@ cc_library(
"*.c",
"*.h",
]),
visibility = ["//c-toxcore/other:__pkg__"],
visibility = [
"//c-toxcore/other:__pkg__",
"//c-toxcore/testing:__pkg__",
],
)