Given the line:
program_OBJS := ${program_SRCS:.cpp=.o}
I would like to append .o to each filename instead of replacing .cpp with .o.
How do I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To just append something to a list of space separated items you can use:
To use the substitution method (like you show in your question):
but for that the list must contain the .cpp suffices, or the substitutions will not occur.