Reorder Makefile targets to properly fix issue #522, this reverts the change in fef8f24e936de76377f60eeee18df9099dcad490, too.