Makefilewhich, in addition to a few extra helpful features, automatically does most of the work of updating itself! After you've installed the
Makefile, the only time you'll need to update it is to add and remove from the list of
.ccfiles. (No need to mention dependencies or
Makefilewith the one in
touch .depend.mk. This just makes an empty file which can then legally be included at the end of your
Makefilewill automagically update this each time it runs.
Makefileautomatically creates all the dependencies for you. After typing
make -k, check out the file called
.depend.mk, which has a list of
file.odependencies. (It reads your code and decides what
emacswill be removed.
OBJS = $(CXX_SRCS:.cc=.o)says, "Make a variable, OBJS, which is identical to CXX_SRCS, but with each .cc replaced by a .o." So, the following two sequences of commands are equivalent:
OBJS = IntPoint.o main.o
OBJS = $(CXX_SRCS:.cc=.o)
man c++filtfor more details.)