OBJECTS = $(SOURCES:.ccp=.o)
Who wants to guess what happened when I ran make clean?
(The c++ file format I was using was .cpp)
This entry was posted
on Monday, July 16th, 2012 at 2:20 pm and is filed under MiniLD #36.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
unless there is a varible called $ then that was your problem
oh and you put the file name cpp to equal 0
oh and unless this was noticed the = boolean is too close to cpp
if im wrong go ahead and correct me.
im not a BIG fan of c++ but i know a little
Mohammad, in a Makefile $ is the prefix to a variable, and that name is contained in the parenthesis.
This case is a Pattern match and replace, anything in SOURCES that is equal to .cpp is now equal to .o in OBJECTS, very useful.
SOURCES = Main.cpp OtherFile.cpp
OBJECTS = $(SOURCES:.cpp=.o)
OBJECTS now contains Main.o OtherFile.o
You must be logged in to post a comment.