GNU Make 3.81 compatibility

3.81 doesn't understand the ‘define foo =’ syntax, which was added in
3.82.  So use ‘define foo’ instead.
Create the target directory of libraries and programs
Remove dead code