Update makefiles after petsc-legacy merge.