Makefile targets:

  all             - compile PSG play, libraries and examples (default)
  install         - install PSG play, libraries and manual page
  psgplay         - compile PSG play for Linux or Mac OS
  PSGPLAY.TOS     - compile PSG play for the Atari ST (requires TARGET_COMPILE)
  web             - compile for Javascript and Webassembly
  example         - compile examples using the PSG play library
  gtags           - make tags for the GNU Global source code tagging system
  version         - display PSG play version
  clean           - remove generated files

  install         - compile and install everything in $prefix
  install-lib     - compile and install only PSG play library in $prefix
  install-psgplay - compile and install only PSG play program in $prefix
  install-man     - compile and install only PSG play manual in $prefix

Test and verification targets and options (requires TARGET_COMPILE=m68k-elf-):

  test            - compile all tests for PSG play
  verify          - compile and verify all tests for PSG play
  report          - compile and report all tests for PSG play

  test-<name>     - compile tests for <name> (psgpitch, tempo, etc.)
  test-<name>-<n> - compile tests for <name>-<n> (tempo-1, tempo-2, etc.)
  verify-<name>   - compile and verify tests for <name>
  verify-<name>-<n> compile and verify tests for <name>-<n>
  report-<name>   - compile and report tests for <name>
  report-<name>-<n> compile and report tests for <name>-<n>

  test-sndh       - compile SNDH files for all tests
  test-wave       - compile WAVE files for all tests
  test-svg        - compile SVG graphs for all tests
  test-png        - compile PNG graphs for all tests
  test-report     - compile report files for all tests

  test/<name>-<n>.report
                  - compile report file for test <name>-<n>
  test/<name>-<n>.svg
                  - compile SVG audio graph for test <name>-<n>
  test/<name>-<n>.png
                  - compile PNG audio graph for test <name>-<n>

  PSGPLAY_TEST    - set optional program to test, other than the psgplay command

  global          - compile PSG play library and check for global variables

Makefile options:

  -j [n]          - n simultaneous jobs for speed; unlimited with no argument

  prefix          - installation prefix (default ~/.local/usr)
  ...             - review main Makefile for more dirs (bindir, libdir, etc.)
  DESTDIR         - directory for staged installs, confer
                    <https://www.gnu.org/prep/standards/html_node/DESTDIR.html>

  V               - set to 1 to compile verbosely
  S               - set to 1 for sanitation checks
  ALSA            - set to 1 to support ALSA for Linux
  PORTAUDIO       - set to 1 to support PortAudio for Linux or Mac OS

  CC              - same as BUILD_CC and HOST_CC (described below)
  LD              - same as HOST_LD (described below)
  AR              - same as HOST_AR (described below)

  BUILD_CC        - set a C compiler to use for the build system
  HOST_CC         - set a C compiler to use for the host system
  HOST_LD         - set a linker to use for the host system
  HOST_AR         - set an archiver to use for the host system
  TARGET_CC       - set a m68k C compiler to use for Atari ST code
  TARGET_LD       - set a m68k linker to use for Atari ST code

  BUILD_CFLAGS    - set C flags for the build system
  HOST_CFLAGS     - set C flags for the host system
  HOST_LDFLAGS    - set linker flags for the host system
  HOST_ARFLAGS    - set archiver flags for the host system
  TARGET_CFLAGS   - set C flags for Atari ST code
  TARGET_LDFLAGS  - set linker flags for Atari ST code

  BUILD_COMPILE   - set C compiler and archiver prefix for the build system
  HOST_COMPILE    - set C compiler and archiver prefix for the host system
  TARGET_COMPILE  - set C compiler and archiver prefix for the Atari ST

Examples:

Build for Linux or Mac OS:

	$ make psgplay

Build for Linux with ALSA:

	$ make ALSA=1 psgplay

Build for Linux or Mac OS with PortAudio:

	$ make PORTAUDIO=1 psgplay

Build for the Atari ST:

	$ make TARGET_COMPILE=m68k-elf- PSGPLAY.TOS

Note that m68k-linux-* compilers emit 68020 alignments and will not work.

Build a statically linked program:

	$ make HOST_LDFLAGS=-static psgplay

Build Javascript and Webassembly libraries using the Emscripten compiler:

	$ make HOST_CC=emcc web

Build a cross-compiled program for the MIPS/R5900 architecture:

	$ make HOST_CC=mipsr5900el-unknown-linux-gnu-gcc psgplay

In addition, review script/compile for more examples.
