revamp handling of defs, incdirs & libs lists