Properly format autogenerated Unix Makefiles (-lm at end, no hardcoded extension)