r18443: add object files only when needed