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