ip.mk: allow out-of-tree ip builds

This commit is contained in:
Zack Buhman 2025-01-02 06:22:11 -06:00
parent 58def35f44
commit c10a1206e3

36
ip.mk
View File

@ -1,16 +1,15 @@
IP_OBJ = \ IP_OBJ = \
systemid.o \ $(LIB)/systemid.o \
toc.o \ $(LIB)/toc.o \
sg/sg_sec.o \ $(LIB)/sg/sg_sec.o \
sg_arejp.o \ $(LIB)/sg_arejp.o \
sg_areus.o \ $(LIB)/sg_areus.o \
sg_areec.o \ $(LIB)/sg_areec.o \
sg_are00.o \ $(LIB)/sg_are00.o \
sg_are01.o \ $(LIB)/sg_are01.o \
sg_are02.o \ $(LIB)/sg_are02.o \
sg_are03.o \ $(LIB)/sg_are03.o \
sg_are04.o \ $(LIB)/sg_are04.o
$(START_OBJ)
SERIAL_LOAD_OBJ = \ SERIAL_LOAD_OBJ = \
example/serial_transfer.o \ example/serial_transfer.o \
@ -20,21 +19,10 @@ SERIAL_LOAD_OBJ = \
font/portfolio_6x8/portfolio_6x8.data.o \ font/portfolio_6x8/portfolio_6x8.data.o \
crc32.o crc32.o
GDROM_JVM_BOOT_OBJ = \
example/gdrom_jvm_boot.o \
sh7091/serial.o \
crc32.o
%.o: %.obj %.o: %.obj
$(OBJCOPY) -g \ $(OBJCOPY) -g \
--rename-section IP=.text.$* \ --rename-section IP=.text.$* \
$< $@ $< $@
serial_load_ip.elf: $(IP_OBJ) $(SERIAL_LOAD_OBJ) serial_load_ip.elf: $(IP_OBJ) $(START_OBJ) $(SERIAL_LOAD_OBJ)
$(LD) --orphan-handling=error --print-memory-usage -T $(LIB)/ip.lds $^ -o $@ $(LD) --orphan-handling=error --print-memory-usage -T $(LIB)/ip.lds $^ -o $@
gdrom_jvm_boot_ip.elf: $(IP_OBJ) $(GDROM_JVM_BOOT_OBJ)
$(LD) --orphan-handling=error --print-memory-usage -T $(LIB)/ip.lds $^ -o $@
gdrom-jvm-boot-ip-bin: gdrom_jvm_boot_ip.bin
cp $< ip.bin