This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new a06e53b1f tools/Wasm.mk: Generate object file name with full path
a06e53b1f is described below

commit a06e53b1f92d008ae69f8d4afa7d236bedce1319
Author: Huang Qi <[email protected]>
AuthorDate: Tue May 30 18:12:18 2023 +0800

    tools/Wasm.mk: Generate object file name with full path
    
    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 <[email protected]>
---
 tools/Wasm.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/Wasm.mk b/tools/Wasm.mk
index 4517588ae..ba4f53463 100644
--- a/tools/Wasm.mk
+++ b/tools/Wasm.mk
@@ -93,27 +93,27 @@ PRIORITY            ?= SCHED_PRIORITY_DEFAULT
 # XIP: Execution In Place
 # JIT: Just In Time
 
-WAMR_MODE       ?= INT
+WAMR_MODE ?= INT
 
 # Targets follow
 
 .PRECIOUS: $(WBIN)
 
 WSRCS := $(MAINSRC) $(CSRCS)
-WOBJS := $(WSRCS:%.c=%.wo)
+WOBJS := $(WSRCS:=$(SUFFIX).wo)
 
 all:: $(WBIN)
 
-$(WOBJS): %.wo : %.c
+$(WOBJS): %.c$(SUFFIX).wo : %.c
        $(Q) $(WCC) $(WCFLAGS) -c $^ -o $@
 
 $(WBIN): $(WOBJS)
        $(shell mkdir -p $(APPDIR)/wasm)
-       $(Q) $(WAR) $@ $(filter-out $(MAINSRC:%.c=%.wo),$^)
+       $(Q) $(WAR) $@ $(filter-out $(MAINSRC:=$(SUFFIX).wo),$^)
        $(foreach main,$(MAINSRC), \
          $(eval mainindex=$(strip $(call GETINDEX,$(main),$(MAINSRC)))) \
-         $(eval dstname=$(shell echo $(main:%.c=%.wo) | sed -e 's/\//_/g')) \
-         $(shell cp -rf $(strip $(main:%.c=%.wo)) \
+       $(eval dstname=$(shell echo $(main:=$(SUFFIX).wo) | sed -e 's/\//_/g')) 
\
+         $(shell cp -rf $(strip $(main:=$(SUFFIX).wo)) \
            $(strip $(APPDIR)/wasm/$(word 
$(mainindex),$(PROGNAME))#$(WASM_INITIAL_MEMORY)#$(STACKSIZE)#$(PRIORITY)#$(WAMR_MODE)#$(dstname))
 \
           ) \
         )

Reply via email to