bejayoharen/guitartuner — pull request #2 by pope (2014-07-13 05:27:04+00:00)
Title: Port guitartuner to Ubuntu.

To accomplish this, I wanted to rely on `pkg-config` for keeping track
of the dependent flags and libs definitions. This eliminated the special
OS tracking from the `makefiles`.

This means that `portaudio` should be installed via a software package
manager, rather than a compile by hand and a move of a library. Ubuntu
has `apt-get`. Luckily, OS X has homebrew and MacPorts, each with the
required libraries.

The only special thing required for Ubuntu was the addition of setting
the _XOPEN_SOURCE macro. Doing so enables the M_PI constant in `math.h`
as well as `sigaction` from `signal.h`.

While changing the makefile, I did perform a couple of cleanups.

- Make The `objs` target is an order-only prerequisite; which feels
appropriate since it only exists to make sure that the `objs` dir has
been created.
- Rename `LINK_FLAGS` variable to more common, `LDFLAGS`.
- Allow `CFLAGS`, `LDFLAGS`, and `LIBS` to have additional values added
to them from the command line. This permits a developer to make a
debug build via `CFLAGS=-g make` rather than needing to edit the
`makefile`.