when a program has multiple MAINSRC for incremental compilation,
the PROGNAME of the compiled file may generate errors
-------------------- compile definition error ---------------------
cc -c -g CFLAGS INCLUDEDIR -Dmain=funA_main funB.c -o funB.c.path.o
^^^^ ^^^^^^ ^^^^
-------------------------------------------------------------------
use the MAINOBJ:PROGNAME mapping variable to define the main entry name
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
wasm clang can't find math.h if using libm from toolchain.
It's OK to using math.h from NuttX since only declaration is needed for wasm build.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
For example, before this patch, object file is like:
```
apps/examples/hello/hello_main.wo
```
With this patch, it will be:
```
apps/examples/hello/hello_main.c.home.huang.Work.nx.apps.examples.hello.wo
'''
Follow the native build:
'''
apps/examples/hello/hello_main.c.home.huang.Work.nx.apps.examples.hello.o
```
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>