Makefile: rename COMPILER -> ASSEMBLER

This commit is contained in:
2025-07-28 10:55:31 +02:00
parent 9c9aeabc97
commit 1848e815fb

View File

@@ -13,9 +13,9 @@ OBJS := $(DIR_BLD)/tests.o \
OBJS_LST := false OBJS_LST := false
SRCS := $(patsubst $(DIR_BLD)/%.o,$(SRC_DIR)/%.asm,$(OBJS)) SRCS := $(patsubst $(DIR_BLD)/%.o,$(SRC_DIR)/%.asm,$(OBJS))
COMPILER := nasm ASSEMBLER := nasm
COMPILER_FLAGS := -f elf64 ASSEMBLER_FLAGS := -f elf64
COMPILER_FLAGS_D := -f elf64 -g -F dwarf ASSEMBLER_FLAGS_D := -f elf64 -g -F dwarf
LINKER := ld LINKER := ld
LINKER_FLAGS := -no-pie -z noexecstack -Ox LINKER_FLAGS := -no-pie -z noexecstack -Ox
@@ -31,17 +31,17 @@ $(DIR_BLD)/%.o: $(DIR_SRC)/%.asm
@mkdir -p $(DIR_BLD) @mkdir -p $(DIR_BLD)
@LST=$(basename $@).lst; \ @LST=$(basename $@).lst; \
if [ "$(OBJS_LST)" = "true" ]; then \ if [ "$(OBJS_LST)" = "true" ]; then \
$(COMPILER) $< $(COMPILER_FLAGS) -l $$LST -o $@; \ $(ASSEMBLER) $< $(ASSEMBLER_FLAGS) -l $$LST -o $@; \
echo $(COMPILER) $< $(COMPILER_FLAGS) -l $$LST -o $@; \ echo $(ASSEMBLER) $< $(ASSEMBLER_FLAGS) -l $$LST -o $@; \
else \ else \
$(COMPILER) $< $(COMPILER_FLAGS) -o $@; \ $(ASSEMBLER) $< $(ASSEMBLER_FLAGS) -o $@; \
echo $(COMPILER) $< $(COMPILER_FLAGS) -o $@; \ echo $(ASSEMBLER) $< $(ASSEMBLER_FLAGS) -o $@; \
fi fi
clean: clean:
rm -rf $(DIR_BLD) tests *.txt rm -rf $(DIR_BLD) tests *.txt
debug: COMPILER_FLAGS = $(COMPILER_FLAGS_D) debug: ASSEMBLER_FLAGS = $(ASSEMBLER_FLAGS_D)
debug: OBJS_LST := true debug: OBJS_LST := true
debug: clean $(OBJS) debug: clean $(OBJS)
@mkdir -p $(DIR_BIN) @mkdir -p $(DIR_BIN)