I downloaded the mangOH and Legato source and configured the environment to build with:
make red_wp76xx LEGATO=1 or make red_wp76xx /LEGATO=1 by default in Makefile/
error coming out:
legatoAF/legato/framework/include/legato.h:146:20: fatal error: unistd.h: No such file or directory
The root cause is that the LEGATO_SYSROOT was not set during building legato project, e.g my project is: WP76XX_SYSROOT variable, the LEGATO_SYSROOT=WP76XX_SYSROOT, the LEGATO_ROOT and WP76XX_SYSROOT were set in your ~/.bashrc according to the doc.
Note: XXXX_SYSROOT should be the project that the one your are developing.
The following patch can fix the above error and build legato + mangoOH successfully.