Rewrite the Makefile
authorIvy Foster <iff@escondida.tk>
Fri, 2 Feb 2018 00:56:20 +0000 (18:56 -0600)
committerIvy Foster <iff@escondida.tk>
Fri, 2 Feb 2018 06:34:08 +0000 (00:34 -0600)
commit7f1f3009e5cc7f0165be6c1904e2003851000cb0
tree638ed66aa27a29e6c9ebd69560860ec44a885eb3
parent7b11414373f7ac6d8d4e183489441fb18e131140
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
Makefile