[make] Use less shell variables

Use fixed variables for things that can't change, instead of variables
like SRCLIBDIR that was causing a shell call for every single use.

Use less functions in general and less shell expansions.

Use builtin functions like $(realpath blah) instead of $(shell
pwd)/blah  In particular, this was important for me trying to build on
windows with git-shell  (powershell) and git-bash in the windows git distribution. This should help a lot on smaller build machines, but doesn't make a huge difference on my own.

This should really get tested on osx, but it works well on both windows and linux for me.