   generating a list of needed files for use in makefiles
  In my makefiles, and other makefiles I've seen, there's always this kind of line:$OBJECTS=main.o xxx.o yyy.oSo, once you want to add another file or class or whatever to you project you have to manually add it to the makefile. For example, I want to add zingabo.cpp to my project so I have to edit the above line to:$OBJECTS=main.o xxx.o yyy.o zingabo.oIs there a way to automatically do that? (Without using an IDE or my nice Python script)I've also read a little about the GNU autotools and from what I understood you still have this kind of problem only in a different manner, i.e. you still have to manually edit some file whenever a new file is added to the project.Please enlighten me.P.S.I'm using Vim under GNU/Linux.   
  A minimal example of what I have in my makefilesCC = g++ #compiler nameBIN = demo #binary nameSUBDIRS = . #list of source directoriesSRC = $(foreach dir, $(SUBDIRS) , $(wildcard $(dir)/*.cpp)) #generate the list of source filesOBJ = $(SRC:.cpp=.o) #generatethe list of obj filesall: $(BIN)$(CC) $(OBJ) -o $@%.o : %.cpp$(CC) -c $< -o $@You can also use cmake, which can do the same thing.   ;Read The Fine Manual. [smile]   ;  Alright :) thank you very much for the replies   