I'm writing a Makefile, I have a list of all the files (without src/
or .cpp
), and I want to convert those to build/*.o
. Here's what I've tried already:
FILES=icxxabi list memory string
OBJECTS=$(echo ("${build/$$FILES[@].o}")[@])
So for the input a dir/b c
, it should output:
build/a.o build/dir/b.o build/c.o
With GNU Make, you could try
OBJECTS=$(patsubst %, build/%.o, $(FILES))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With