Makefile which, 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 .cc files. (No need to mention dependencies or
.h files!)
Makefile with the one in
~mc38/labs/makefile-fancy/Makefile.
touch
.depend.mk. This just makes an empty file which can then
legally be included at the end of your Makefile. The
Makefile will automagically update this each time it
runs.
Makefile:
Makefile automatically creates all the
dependencies for you. After typing make -k, check out
the file called .depend.mk, which has a list of
file.o dependencies. (It reads your code and decides
what file.h files you #include.)
emacs will 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++filt
for more details.)