fix smart-rules.pl
fix remake
fix contrib-libs.mk