set objdir via pref and other cleanup