From: fennecdjay Date: Fri, 27 Jan 2023 11:48:12 +0000 (+0100) Subject: :art: add standalone cap to config X-Git-Tag: nightly~206^2~8 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=ca856d55faf8501d90122a72e42cf3260dbadfb6;p=gwion.git :art: add standalone cap to config --- diff --git a/Makefile b/Makefile index f91c102c..65352573 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ options-show: with_config: bash scripts/embed.bash gwion.config.json touch src/main.c - USE_CONFIG=1 CFLAGS="-DGWION_EMBED_GW -Iembed $(eval ${CFLAGS})" ${MAKE} + ${MAKE} USE_CONFIG=1 touch src/main.c almost_gwion: ${almost_obj} ${ALMOST_LIBS} diff --git a/scripts/embed.bash b/scripts/embed.bash index bad1b1b2..6def47f6 100644 --- a/scripts/embed.bash +++ b/scripts/embed.bash @@ -182,3 +182,7 @@ ldflags=$(jq -rc '.ldflags' <<< "$json") echo "LDFLAGS += $ldflag " done } >> embed/embed.mk +standalone=$(jq -rc '.standalone' <<< "$json") +[ "$standalone" = "true" ] && { + echo "CFLAGS += -DGWION_STANDALONE" +} >> embed/embed.mk diff --git a/src/arg.c b/src/arg.c index 13c7408b..1c1a7e73 100644 --- a/src/arg.c +++ b/src/arg.c @@ -73,7 +73,9 @@ ANN static void arg_init(CliArg *arg) { vector_init(&arg->add); vector_init(&arg->lib); vector_init(&arg->config); +#ifndef GWION_STANDALONE vector_add(&arg->lib, (vtype)plug_dir()); +#endif arg->color = COLOR_AUTO; } @@ -386,6 +388,8 @@ ANN m_bool arg_parse(const Gwion gwion, CliArg *a) { #ifdef __FUZZING return; #endif +#ifndef GWION_STANDALONE config_default(&arg); +#endif return _arg_parse(&arg); }