From a44c59b6ab7b45bd52408bb67c17b6aa09aefeef Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 18 Aug 2024 01:15:01 +0300 Subject: enable analyzer for tasm, fix some reported issues --- tasm/scripts/makefile | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tasm/scripts') diff --git a/tasm/scripts/makefile b/tasm/scripts/makefile index 367c03e..1d3bf5d 100644 --- a/tasm/scripts/makefile +++ b/tasm/scripts/makefile @@ -30,9 +30,14 @@ OBJCOPY != [ "$(LLVM)" != "0" ] \ && echo llvm-objcopy \ || echo $(CROSS_COMPILE)objcopy -COMPILER != [ "$(LLVM)" != "0" ] \ - && echo clang --target="$(CROSS_COMPILE)" \ - || echo $(CROSS_COMPILE)gcc +COMPILER != [ -n "$(CROSS_COMPILE)" ] \ + && { \ + [ "$(LLVM)" != "0" ] \ + && echo clang --target="$(CROSS_COMPILE)" \ + || echo $(CROSS_COMPILE)gcc \ + ; \ + } \ + || echo $(CC) OBFLAGS = -std=gnu17 -g @@ -56,15 +61,15 @@ LINT = $(COMPILER) \ UBSAN ?= 0 TASM_FLAGS != [ "$(UBSAN)" != "0" ] \ && echo -fsanitize=undefined \ - || echo + || : COMPILE_TASM = $(COMPILE) $(TASM_FLAGS) --include deps.mk --include src/source.mk +include deps.mk +include gen/source.mk -tasm: $(TASM_OBJS) - $(COMPILE_TASM) $(TASM_OBJS) -o $@ +tasm: $(TASM_OBJS) build/gen/gen_parser.o + $(COMPILE_TASM) $(TASM_OBJS) build/gen/gen_parser.o -o $@ # might lint some common things twice -- cgit v1.3