Small cleanup
Some checks failed
Build / Build repo (${{ matrix.version }}) (eu) (push) Has been cancelled
Build / Build repo (${{ matrix.version }}) (fr) (push) Has been cancelled
Build / Build repo (${{ matrix.version }}) (proto) (push) Has been cancelled
Build / Build repo (${{ matrix.version }}) (us) (push) Has been cancelled

This commit is contained in:
Gillou68310 2024-10-28 17:45:51 +01:00
parent 6396a5e708
commit e9189093b0
6 changed files with 30 additions and 7 deletions

View File

@ -202,16 +202,16 @@ $(BUILD_DIR)/%.c.o: %.c
@$(PRINT)$(GREEN)Compiling C file: $(ENDGREEN)$(BLUE)$<$(ENDBLUE)$(ENDLINE)
@mkdir -p $(shell dirname $@)
ifeq ($(CHECK),1)
@$(CC_HOST) $(CFLAGS_CHECK) $(CHECK_WARNINGS) $(CPPFLAGS) -MMD -MP -MT $@ -MF $@.d $<
@$(CC_HOST) $(CFLAGS_CHECK) $(CHECK_WARNINGS) $(CPPFLAGS) $<
endif
$(V)$(CPP) $(CFLAGS) $(CPPFLAGS) -ffreestanding -U__mips -D__FILE__=\"$(notdir $<)\" -Wno-builtin-macro-redefined $< -o $@.i
$(V)$(CPP) $(CFLAGS) $(CPPFLAGS) -ffreestanding -U__mips -D__FILE__=\"$(notdir $<)\" -Wno-builtin-macro-redefined -MMD -MP -MT $@ -MF $@.d $< -o $@.i
$(V)$(CC) $(OPTFLAGS) $(CFLAGS) -c -o $@ $@.i
# Compile .s files with kmc as but preprocessed by modern gnu cpp
$(BUILD_DIR)/%.s.o: %.s
@$(PRINT)$(GREEN)Assembling asm file: $(ENDGREEN)$(BLUE)$<$(ENDBLUE)$(ENDLINE)
@mkdir -p $(shell dirname $@)
$(V)$(CPP) $(ASFLAGS) $(CPPFLAGS) -U_LANGUAGE_C $< -o $@.i
$(V)$(CPP) $(CPPFLAGS) -U_LANGUAGE_C $< -o $@.i
$(V)$(AS) $(ASFLAGS) -o $@ $@.i
# Create .o files from .bin files.

View File

@ -1,4 +1,15 @@
.macro glabel label
.global \label
.type \label, @function
\label:
.endm
.macro dlabel label
.global \label
\label:
.endm
.macro jlabel label
.global \label
\label:
.endm

View File

@ -32,7 +32,10 @@ options:
generated_c_preamble: "#include \"common.h\"\n\n/*.text*/"
use_legacy_include_asm: False
ld_wildcard_sections: True
asm_emit_size_directive: False
asm_emit_size_directive: True
asm_function_macro: glabel
asm_jtbl_label_macro: jlabel
asm_data_macro: dlabel
ld_discard_section: False
symbol_name_format: $VRAM_$ROM
ld_generate_symbol_per_data_segment: True

View File

@ -32,7 +32,10 @@ options:
generated_c_preamble: "#include \"common.h\"\n\n/*.text*/"
use_legacy_include_asm: False
ld_wildcard_sections: True
asm_emit_size_directive: False
asm_emit_size_directive: True
asm_function_macro: glabel
asm_jtbl_label_macro: jlabel
asm_data_macro: dlabel
ld_discard_section: False
symbol_name_format: $VRAM_$ROM
ld_generate_symbol_per_data_segment: True

View File

@ -32,7 +32,10 @@ options:
generated_c_preamble: "#include \"common.h\"\n\n/*.text*/"
use_legacy_include_asm: False
ld_wildcard_sections: True
asm_emit_size_directive: False
asm_emit_size_directive: True
asm_function_macro: glabel
asm_jtbl_label_macro: jlabel
asm_data_macro: dlabel
ld_discard_section: False
symbol_name_format: $VRAM_$ROM
ld_generate_symbol_per_data_segment: True

View File

@ -32,7 +32,10 @@ options:
generated_c_preamble: "#include \"common.h\"\n\n/*.text*/"
use_legacy_include_asm: False
ld_wildcard_sections: True
asm_emit_size_directive: False
asm_emit_size_directive: True
asm_function_macro: glabel
asm_jtbl_label_macro: jlabel
asm_data_macro: dlabel
ld_discard_section: False
ld_generate_symbol_per_data_segment: True
auto_link_sections: [".data", ".rodata", ".bss"]