Friction and wear of diamond and diamondlike carbon coatings