Backported makefile fixes
Flattened many gradients