Skip to content

Commit

Permalink
chore: Fix make_single_file to support core-only.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Dec 19, 2023
1 parent 19d8f18 commit 38389f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
16 changes: 14 additions & 2 deletions other/docker/tcc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,25 @@ RUN tcc \

COPY other/make_single_file /work/other/
RUN \
other/make_single_file \
other/make_single_file -core \
auto_tests/auto_test_support.c \
auto_tests/send_message_test.c \
testing/misc_tools.c | \
tcc - \
-o send_message_test \
-Wall -Werror \
-bench -g \
$(pkg-config --cflags --libs libsodium opus vpx) \
$(pkg-config --cflags --libs libsodium) \
&& ./send_message_test | grep 'tox clients connected'

RUN \
other/make_single_file \
auto_tests/auto_test_support.c \
auto_tests/toxav_basic_test.c \
testing/misc_tools.c | \
tcc - \
-o toxav_basic_test \
-Wall -Werror \
-bench -g \
$(pkg-config --cflags --libs libsodium opus vpx) \
&& ./toxav_basic_test | grep 'Test successful'
9 changes: 6 additions & 3 deletions other/make_single_file
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
#
# Example:
#
# other/make_single_file testing/misc_tools.c auto_tests/send_message_test.c | \
# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium opus vpx)
# other/make_single_file auto_tests/toxav_basic_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \
# tcc -o toxav_basic_test - $(pkg-config --cflags --libs libsodium opus vpx)
#
# other/make_single_file -core auto_tests/send_message_test.c auto_tests/auto_test_support.c testing/misc_tools.c | \
# tcc -o send_message_test - $(pkg-config --cflags --libs libsodium)

use strict;
use warnings;
Expand Down Expand Up @@ -44,7 +47,7 @@ sub emit {

if (@ARGV and $ARGV[0] eq "-core") {
shift @ARGV;
for my $fn (<toxcore/*.c>, <third_party/cmp/*.c>) {
for my $fn (<toxcore/*.c>, <toxcore/*/*.c>, <third_party/cmp/*.c>) {
emit(abs_path $fn);
}
} else {
Expand Down

0 comments on commit 38389f1

Please sign in to comment.