Application.mk: Fix Zig build break
Correct wrong make variable name for Zig main source,
and update compile command for latest compiler.
@@ -91,7 +91,7 @@ SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(MAINSRC)
OBJS = $(RAOBJS) $(CAOBJS) $(COBJS) $(CXXOBJS) $(RUSTOBJS) $(ZIGOBJS)
ifneq ($(BUILD_MODULE),y)
- OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJS)
+ OBJS += $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ)
endif
DEPPATH += --dep-path .
@@ -127,7 +127,8 @@ endef
define ELFCOMPILEZIG
@echo "ZIG: $1"
- $(Q) $(ZIG) build-obj $(ZIGELFFLAGS) $($(strip $1)_ZIGELFFLAGS) $1 --name $2
+ # Remove target suffix here since zig compiler add .o automatically
+ $(Q) $(ZIG) build-obj $(ZIGELFFLAGS) $($(strip $1)_ZIGELFFLAGS) --name $(basename $2) $1
endef
define ELFLD
