build afmmode