xiaoxiang781216 commented on code in PR #2260:
URL: https://github.com/apache/nuttx-apps/pull/2260#discussion_r1454995615


##########
Application.mk:
##########
@@ -235,9 +235,16 @@ $(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
        $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
                $(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
 
-$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ)
+$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
+       $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
+               $(call ELFCOMPILEZIG,$<,$@), $(call COMPILEZIG, $<, $@))
+       $(Q) echo $(MAINZIGOBJ) $@

Review Comment:
   remove



##########
Application.mk:
##########
@@ -235,9 +235,16 @@ $(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
        $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
                $(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
 
-$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ)
+$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
+       $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
+               $(call ELFCOMPILEZIG,$<,$@), $(call COMPILEZIG, $<, $@))
+       $(Q) echo $(MAINZIGOBJ) $@
+
+$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ)
        $(Q) mkdir -p $(BINDIR)
-       $(call ELFLD,$(PROGOBJ_$@),$(call CONVERT_PATH,$@))
+       $(if $(PROGOBJ_$@), \

Review Comment:
   why zig application doesn't in the PROGLIST?



##########
examples/hello_zig/Makefile:
##########
@@ -22,7 +22,7 @@ include $(APPDIR)/Make.defs
 
 # Hello, Zig! Example
 
-MAINSRC = hello_zig_main.zig
+MAINSRC = $(if $(CONFIG_BUILD_KERNEL), hello_zig.zig, hello_zig_main.zig)

Review Comment:
   but why need different code for kernel/flat?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to