Apply @nicolasnoble makefile fix

This commit is contained in:
ABelliqueux 2021-07-13 11:15:06 +02:00
parent 25b5c61633
commit dbe5a8e465
2 changed files with 6 additions and 4 deletions

View File

@ -24,6 +24,4 @@ TIM/bg_camPath_005.tim \
OVERLAYSCRIPT ?= overlay.ld
OVERLAYSECTION ?= .lvl0 .lvl1
# img2tim -t -bpp 8 -org 320 0 -plt 0 481 -o bg.tim bg.png
include ./common.mk
include ./thirdparty/nugget/common.mk \

View File

@ -30,10 +30,14 @@ LDFLAGS += -ltap
LDFLAGS += -lcd
LDFLAGS += -Wl,--end-group
THISDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(THISDIR)/thirdparty/nugget/common.mk
# 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 elf32-tradlittlemips -B mips $< $@
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@
# 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 elf32-tradlittlemips -B mips $< $@
$(PREFIX)-objcopy -I binary --set-section-alignment .data=4 --rename-section .data=.rodata,alloc,load,readonly,data,contents -O $(FORMAT) -B mips $< $@