Build dependencies properly.