fix some compile warnings
add magenta as separate lib