compile main as well