From d329b145a0f9b853f14a5008a38bb06c8a3e7b25 Mon Sep 17 00:00:00 2001 From: afonso Date: Sun, 25 Feb 2024 19:41:34 +0000 Subject: [PATCH] Added example for wildcards feature --- examples/wildcards.toml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/wildcards.toml diff --git a/examples/wildcards.toml b/examples/wildcards.toml new file mode 100644 index 0000000..c885a14 --- /dev/null +++ b/examples/wildcards.toml @@ -0,0 +1,11 @@ +[vars] +CC="!which gcc" +CFLAGS="-Wall -O2 -I/opt/homebrew/opt/openssl@3.2/include -L/opt/homebrew/opt/openssl@3.2/lib" +LDFLAGS="-lssl -lcrypto" + +[targets.build] +# This makes use of the wildcards feature to generate a list of source files and output files +# and compiles each source file to an output file +wildcards=["!ls -1 src/*.c","!ls -1 src/*.c | sed -e 's/\\.c$//' | sed -e 's/^src/bin/'"] +cmd="${CC} ${CFLAGS} ${LDFLAGS} @@ -o @@" +