Added some remaining static-build related stuff from our old Makefile.
Must clean this up later.