Added example for wildcards feature

This commit is contained in:
Afonso Franco 2024-02-25 19:41:34 +00:00
parent 9445dafdf8
commit d329b145a0
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys

11
examples/wildcards.toml Normal file
View file

@ -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 @@"