Compile files in the correct dependency order