Rewrite the Makefile
Some general patterns for the changes:
- Use user LDFLAGS and CFLAGS
- Generally allow user to pass well-known variables through the
environment or on the command-line rather than editing the file and
finding what they're called
- Get rid of non-standard variables like OPTS in favor of additive
assignmet
- Remove repetitive code (compare %.a definition with previous foo_lib
recipes)
- Correct build dependencies (e.g., it is frotz_curses.a that requires
the curses defines.h; frotz itself requires that defines.h only
indirectly)
- Reduce number of needless variables; it's just as easy to use sed to
change all occurrences of "frotz" if the name ever changes as it
would be to change $(NAME)
- Clarify recipes where possible by breaking out conditionals and such
that can go elsewhere
- Make git usage less brittle by providing fall-backs; this also means
that releases built from dist tarballs are more clearly marked by
having GIT_BRANCH and GIT_HASH be "none"
- Remove variable definitions that make automagically handles when not
passed by user, such as CC
I also removed any mention of the oss and sun audio options, since the
existing checks raised an error if any option other than "ao" or
"none" was passed