Skip to content

Commit e009506

Browse files
committed
Use -Os and dolxz
Trim the last few bytes off to fit within the Qoob SX updater. Most likely requires a custom dolxz build using clang and -Os.
1 parent de10231 commit e009506

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ INCLUDES := -nostdlibinc -isystem $(DEVKITPPC)/powerpc-eabi/include
2929
# options for code generation
3030
#---------------------------------------------------------------------------------
3131

32-
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE)
32+
CFLAGS = -g -Os -Wall $(MACHDEP) $(INCLUDE)
3333
CXXFLAGS = $(CFLAGS)
3434

3535
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map -T$(PWD)/ipl.ld
@@ -114,11 +114,11 @@ $(BUILD):
114114
clean:
115115
@echo clean ...
116116
@rm -fr $(BUILD) $(OUTPUT).{elf,dol} $(OUTPUT).{gcb,vgc} \
117-
$(OUTPUT)_lz.{dol,elf,qbsx} $(OUTPUT_SX) $(OUTPUT)_xeno.{bin,elf}
117+
$(OUTPUT)_xz.{dol,elf,qbsx} $(OUTPUT_SX) $(OUTPUT)_xeno.{bin,elf}
118118

119119
#---------------------------------------------------------------------------------
120120
run: $(BUILD)
121-
usb-load $(OUTPUT).dol
121+
usb-load $(OUTPUT)_xz.dol
122122

123123

124124
#---------------------------------------------------------------------------------
@@ -137,19 +137,19 @@ $(OUTPUT).elf: $(OFILES)
137137
@echo pack IPL ... $(notdir $@)
138138
@cd $(PWD); ./dol2ipl.py ipl.rom $< $@
139139

140-
$(OUTPUT)_lz.dol: $(OUTPUT).dol
140+
$(OUTPUT)_xz.dol: $(OUTPUT).dol
141141
@echo compress ... $(notdir $@)
142-
@dollz3 $< $@ -m
142+
@dolxz $< $@ -cube
143143

144-
$(OUTPUT)_lz.elf: $(OUTPUT)_lz.dol
144+
$(OUTPUT)_xz.elf: $(OUTPUT)_xz.dol
145145
@echo dol2elf ... $(notdir $@)
146146
@doltool -e $<
147147

148148
%.qbsx: %.elf
149149
@echo pack IPL ... $(notdir $@)
150150
@cd $(PWD); ./dol2ipl.py /dev/null $< $@
151151

152-
$(OUTPUT_SX): $(OUTPUT)_lz.qbsx
152+
$(OUTPUT_SX): $(OUTPUT)_xz.qbsx
153153
@echo splice ... $@
154154
@cd $(PWD); cp -f qoob_sx_13c_upgrade.elf $@
155155
@cd $(PWD); dd if=$< of=$@ obs=4 seek=1851 conv=notrunc

0 commit comments

Comments
 (0)