Use a better copy/pasta rule for objcopying stuff.

This commit is contained in:
Nicolas 'Pixel' Noble 2021-07-17 21:12:23 -07:00
parent f736fe679d
commit 87ea1dec53

View File

@ -38,10 +38,14 @@ LDFLAGS += -Wl,--end-group
include $(THISDIR)thirdparty/nugget/common.mk
define OBJCOPYME
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@
endef
# convert TIM file to bin
%.o: %.tim
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@
$(call OBJCOPYME)
# convert VAG files to bin
%.o: %.vag
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@
$(call OBJCOPYME)