compile object files first to avoid out-of-memory error