cmake works for mads; more work is still needed