From: fennecdjay Date: Wed, 22 Feb 2023 14:20:37 +0000 (+0100) Subject: :art: Update config build X-Git-Tag: nightly~204 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=30323f621451b1b15b11c9c08169b32029ab53ce;p=gwion.git :art: Update config build --- diff --git a/scripts/embed.bash b/scripts/embed.bash index 6def47f6..6be08749 100644 --- a/scripts/embed.bash +++ b/scripts/embed.bash @@ -87,6 +87,14 @@ jq -rc '.[]' <<< "$libraries" | do path=$(jq -c '.path' <<< "$lib" | sed -e 's/^"//' -e 's/"$//') names=$(jq -c '.names' <<< "$lib") + cflags=$(jq -c '.cflags' <<< "$lib") + if [ "$cflags" != "null" ] + then config "CFLAGS += $cflags" + fi + ldflags=$(jq -c '.ldflags' <<< "$lib") + if [ "$ldflags" != "null" ] + then config "LDFLAGS += $ldflags" + fi config "LDFLAGS += $path" if [ "$names" != "null" ] then diff --git a/src/arg.c b/src/arg.c index 4f4f4e1c..828d2c29 100644 --- a/src/arg.c +++ b/src/arg.c @@ -46,6 +46,7 @@ ANN static inline void config_end(const Vector config) { } } +#ifndef GWION_CONFIG_ARGS ANN static m_str plug_dir(void) { const m_str home = getenv("HOME"); const size_t sz = strlen(home); @@ -55,6 +56,7 @@ ANN static m_str plug_dir(void) { strcpy(plug_dir + sz, pdir); return plug_dir; } +#endif enum arg_type { ARG_FILE, @@ -375,12 +377,14 @@ ANN m_bool _arg_parse(struct ArgInternal *arg) { return GW_OK; } +#ifndef GWION_CONFIG_ARGS ANN static void config_default(struct ArgInternal *arg) { char *home = getenv("HOME"); char c[strlen(home) + strlen(GWIONRC) + 2]; sprintf(c, "%s/%s", home, GWIONRC); config_parse(arg, c); } +#endif ANN m_bool arg_parse(const Gwion gwion, CliArg *a) { struct ArgInternal arg = {.gwion = gwion, .arg = a};