Fix Makefile dependency ordering