What does TEMP0_FILES below compute to? SOURCE_FILES can equal to multiple source files. Please tell me the purpose of the following syntax :.cpp=.o
SOURCE_FILES = main.cpp
TEMP0_FILES = $(SOURCE_FILES:.cpp=.o)
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.
The : syntax causes a substitution to occur on the variable. In this case it will replace “.cpp” with “.o” in all of the items in the SOURCE_FILES variable.
TEMP0_FILES will be “main.o”
If SOURCE_FILES is “main.cpp otherfile.cpp otherfile2.cpp” TEMP0_FILES will become: “main.o otherfile.o otherfile2.o” etc.