From 6c2e51a3f8695cb95d6a4a6859d3f934e28c8f9f Mon Sep 17 00:00:00 2001 From: Kimplul Date: Wed, 2 Apr 2025 21:14:23 +0300 Subject: improve build system a bit --- scripts/makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'scripts/makefile') diff --git a/scripts/makefile b/scripts/makefile index 3a4f200..bd02c98 100644 --- a/scripts/makefile +++ b/scripts/makefile @@ -29,16 +29,21 @@ 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 := -g WARNFLAGS := -Wall -Wextra COMPILE_FLAGS := $(CFLAGS) $(WARNFLAGS) $(OPTFLAGS) $(LTOFLAGS) \ - $(OBFLAGS) $(ASSERTFLAGS) $(DEBUGFLAGS) + $(OBFLAGS) $(DEBUGFLAGS) INCLUDE_FLAGS := -I include -- cgit v1.2.3