How to build native C application and deploy it into rootFs?

Can anyone provide the quick guide for building the native C application instead of Legato AF app and how to deploy it into rootFS?
I’m trying to do it now but I hope anyone have that experience and made some guide for this.
Also I’m trying to make/deploy python application with some additional module installation. Does anyone know or have experience of doing the similar work? How to deploy the additional python module into rootFS is the key question.
Thanks.

additional python:
./meta-swi/meta-swi-mdm9x28/recipes-core/images/mdm9x28-image.inc
IMAGE_INSTALL_append = " python python-pyserial python-argparse python-importlib python-zlib"


native C application:
you can refer to here to add new layer:

Hi jyijyi,
This answer is exactly what I was looking for. You made me save a lot of time!
Really appreciate.