Generalize obj compilation