I'm a bit new to makefiles, so pardon me if this question is really foolish.
If I have a single class called Entity, my makefile will be as follows:
I'm concerned about theCode:CCC = mingw32-g++ BINARIES = Main.o Container.o Entity.o Object.o Room.o all : $(BINARIES) ${CCC} -o game.exe ${BINARIES} Main.o : Entity.h $(CCC) -c Main.cpp Entity.o : Entity.h Entity.cpp $(CCC) -c Entity.cpp clean : del /q /s ${BINARIES}
line. If I later make a class called TempEntity, which is a derived class of Entity, how would I need to compile the O file?Code:Entity.o : Entity.h Entity.cpp
Would it be:orCode:TempEntity.o : TempEntity.h TempEntity.cpp
and why?Code:TempEntity.o : Entity.h Entity.cpp TempEntity.h TempEntity.cpp
--Ashiq



LinkBack URL
About LinkBacks



