Reflect - Makefiles
If you've ever repeatedly compiled something by hand you'll quickly appreciate the automation of Makefiles. While the examples used in this course are limited to compilation, Makefiles can be used for any purpose, e.g.:
PHRASE = "Hello"
statement: /usr/bin/echo
/usr/bin/echo $(PHRASE)
Makefiles are also useful when compiling a program on computers of different architectures (e.g., a Macintosh and an Intel PC). Merely copy the files over to the target machine and run `make clean` followed by `make all`. You may need to do this if you want to run your programs in both 300 and 300A.
Can you think of any other uses for Makefiles? |