From 0422e6f568c420ea30ff7a7b105f7b3815922c07 Mon Sep 17 00:00:00 2001 From: Dark Date: Sat, 24 Oct 2020 00:12:06 -0400 Subject: [PATCH 1/3] make the build process "quieter" This commit modifies the makefile in order to allow for a quieter build. It does hide the executed commands but they can be shown by running make `S=` --- Makefile | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 39fc084cd..a1670664d 100644 --- a/Makefile +++ b/Makefile @@ -75,16 +75,19 @@ INCLUDES := -Iinclude -Iinclude/dolphin -Iinclude/CodeWarrior -Iinclude/rwsdk ASFLAGS := -mgekko -I include LDFLAGS := -map $(MAP) -CFLAGS := -g -DGAMECUBE -Cpp_exceptions off -proc gekko -fp hard -O4,p -msgstyle gcc \ +CFLAGS := -g -Cpp_exceptions off -proc gekko -fp hard -O4,p -msgstyle gcc \ -pragma "check_header_flags off" -pragma "force_active on" \ - -str reuse,pool,readonly -char unsigned -use_lmw_stmw on -inline off -gccincludes $(INCLUDES) -PREPROCESS := -preprocess -DGAMECUBE -gccincludes $(INCLUDES) + -str reuse,pool,readonly -char unsigned -use_lmw_stmw on -inline off -gccincludes $(INCLUDES) +PREPROCESS := -preprocess -DGAMECUBE -gccincludes $(INCLUDES) -DGAMECUBE PPROCFLAGS := -fsymbol-fixup # elf2dol needs to know these in order to calculate sbss correctly. SDATA_PDHR := 9 SBSS_PDHR := 10 +# Silences most build commands. Run make S= to show all commands being invoked. +S := @ + #------------------------------------------------------------------------------- # Recipes #------------------------------------------------------------------------------- @@ -101,8 +104,9 @@ DUMMY != mkdir -p $(ALL_DIRS) .PHONY: tools $(DOL): $(ELF) | tools - $(ELF2DOL) $< $@ $(SDATA_PDHR) $(SBSS_PDHR) $(TARGET_COL) - $(SHA1SUM) -c bfbb.sha1 || $(ASMDIFF) + @echo " ELF2DOL "$@ + $S$(ELF2DOL) $< $@ $(SDATA_PDHR) $(SBSS_PDHR) $(TARGET_COL) + $S$(SHA1SUM) -c bfbb.sha1 || $(ASMDIFF) clean: rm -f $(DOL) $(ELF) $(O_FILES) $(MAP) @@ -112,20 +116,23 @@ tools: $(MAKE) -C tools $(ELF): $(O_FILES) $(LDSCRIPT) - $(LD) $(LDFLAGS) -o $@ -lcf $(LDSCRIPT) $(O_FILES) + @echo " LINK "$@ + $S$(LD) $(LDFLAGS) -o $@ -lcf $(LDSCRIPT) $(O_FILES) 1>&2 # The Metrowerks linker doesn't generate physical addresses in the ELF program headers. This fixes it somehow. - $(OBJCOPY) $@ $@ + $S$(OBJCOPY) $@ $@ $(OBJ_DIR)/%.o: %.s - $(AS) $(ASFLAGS) -o $@ $< - @$(PPROC) $(PPROCFLAGS) $@ + @echo " AS "$< + $S$(AS) $(ASFLAGS) -o $@ $< + $S$(PPROC) $(PPROCFLAGS) $@ $(OBJ_DIR)/%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< + @echo " CC "$< + $S$(CC) $(CFLAGS) -c -o $@ $< 1>&2 $(OBJ_DIR)/%.o: %.cpp - $(CC) $(PREPROCESS) -o $*.cp $< - $(GLBLASM) -s $*.cp - $(CC) $(CFLAGS) -c -o $@ $*.cp - $(CC) -S -o $*.asm $@ - @$(PPROC) $(PPROCFLAGS) $@ \ No newline at end of file + @echo " CXX "$< + $S$(CC) $(PREPROCESS) -o $*.cp $< 1>&2 + $S$(GLBLASM) -s $*.cp + $S$(CC) $(CFLAGS) -c -o $@ $*.cp 1>&2 + $S$(PPROC) $(PPROCFLAGS) $@ From 452b6cf339e00b924d97585f2e7f1b819d4b3824 Mon Sep 17 00:00:00 2001 From: Dark Date: Sat, 24 Oct 2020 16:49:58 -0400 Subject: [PATCH 2/3] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a1670664d..92de2febb 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ LDFLAGS := -map $(MAP) CFLAGS := -g -Cpp_exceptions off -proc gekko -fp hard -O4,p -msgstyle gcc \ -pragma "check_header_flags off" -pragma "force_active on" \ -str reuse,pool,readonly -char unsigned -use_lmw_stmw on -inline off -gccincludes $(INCLUDES) -PREPROCESS := -preprocess -DGAMECUBE -gccincludes $(INCLUDES) -DGAMECUBE +PREPROCESS := -preprocess -DGAMECUBE -gccincludes $(INCLUDES) PPROCFLAGS := -fsymbol-fixup # elf2dol needs to know these in order to calculate sbss correctly. From fb89030abc73a6488fba5179083d863ed9f93861 Mon Sep 17 00:00:00 2001 From: Dark Date: Sat, 24 Oct 2020 17:46:11 -0400 Subject: [PATCH 3/3] Update Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 92de2febb..3b133aa30 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,7 @@ INCLUDES := -Iinclude -Iinclude/dolphin -Iinclude/CodeWarrior -Iinclude/rwsdk ASFLAGS := -mgekko -I include LDFLAGS := -map $(MAP) -CFLAGS := -g -Cpp_exceptions off -proc gekko -fp hard -O4,p -msgstyle gcc \ +CFLAGS := -g -DGAMECUBE -Cpp_exceptions off -proc gekko -fp hard -O4,p -msgstyle gcc \ -pragma "check_header_flags off" -pragma "force_active on" \ -str reuse,pool,readonly -char unsigned -use_lmw_stmw on -inline off -gccincludes $(INCLUDES) PREPROCESS := -preprocess -DGAMECUBE -gccincludes $(INCLUDES)