From 50f00958d874c4e5a6ec947812f0bc8edf935ab8 Mon Sep 17 00:00:00 2001 From: GaryOderNichts <12049776+GaryOderNichts@users.noreply.github.com> Date: Tue, 19 Sep 2023 01:22:53 +0200 Subject: [PATCH] Make sure symbol files are updated if elf changes --- source/ios_fs/Makefile | 2 +- source/ios_kernel/Makefile | 10 +--------- source/ios_mcp/Makefile | 2 +- source/ios_usb/Makefile | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/source/ios_fs/Makefile b/source/ios_fs/Makefile index b51abea..b706182 100644 --- a/source/ios_fs/Makefile +++ b/source/ios_fs/Makefile @@ -122,7 +122,7 @@ $(OUTPUT).bin.h: $(OUTPUT).bin @raw2c $< @cp $(TARGETNAME).c $@ -$(OUTPUT)_syms.h: +$(OUTPUT)_syms.h: $(OUTPUT).elf @echo "#ifndef $(TARGETNAME)_SYMS_H" > $@ @echo "#define $(TARGETNAME)_SYMS_H" >> $@ @$(OBJDUMP) -EB -t -marm $(OUTPUT).elf | grep 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@ diff --git a/source/ios_kernel/Makefile b/source/ios_kernel/Makefile index 20fa0e6..ff39ac4 100644 --- a/source/ios_kernel/Makefile +++ b/source/ios_kernel/Makefile @@ -110,7 +110,7 @@ DEPENDS := $(OFILES:.o=.d) #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- -all : $(OUTPUT).bin.h $(OUTPUT)_syms.h +all : $(OUTPUT).bin.h $(OUTPUT).elf : $(OFILES) @@ -122,14 +122,6 @@ $(OUTPUT).bin.h: $(OUTPUT).bin @raw2c $< @cp $(TARGETNAME).c $@ -$(OUTPUT)_syms.h: - @echo "#ifndef $(TARGETNAME)_SYMS_H" > $@ - @echo "#define $(TARGETNAME)_SYMS_H" >> $@ - @$(OBJDUMP) -EB -t -marm $(OUTPUT).elf | grep 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@ - @$(OBJDUMP) -EB -t -marm $(OUTPUT).elf | grep -e 'g .text' -e '_bss_' | awk '{print "#define " $$5 " 0x" $$1}' >> $@ - @$(OBJDUMP) -EB -t -marm $(OUTPUT).elf | grep 'g O .fn_hook_bufs' | awk '{print "#define " $$6 " 0x" $$1}' >> $@ - @echo "#endif" >> $@ - $(OFILES_SRC) : $(HFILES_BIN) #------------------------------------------------------------------------------- diff --git a/source/ios_mcp/Makefile b/source/ios_mcp/Makefile index 63e3861..877f8ad 100644 --- a/source/ios_mcp/Makefile +++ b/source/ios_mcp/Makefile @@ -122,7 +122,7 @@ $(OUTPUT).bin.h: $(OUTPUT).bin @raw2c $< @cp $(TARGETNAME).c $@ -$(OUTPUT)_syms.h: +$(OUTPUT)_syms.h: $(OUTPUT).elf @echo "#ifndef $(TARGETNAME)_SYMS_H" > $@ @echo "#define $(TARGETNAME)_SYMS_H" >> $@ @$(OBJDUMP) -EB -t -marm $(OUTPUT).elf | grep 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@ diff --git a/source/ios_usb/Makefile b/source/ios_usb/Makefile index a1d58fb..9270e7e 100644 --- a/source/ios_usb/Makefile +++ b/source/ios_usb/Makefile @@ -122,7 +122,7 @@ $(OUTPUT).bin.h: $(OUTPUT).bin @raw2c $< @cp $(TARGETNAME).c $@ -$(OUTPUT)_syms.h: +$(OUTPUT)_syms.h: $(OUTPUT).elf @echo "#ifndef $(TARGETNAME)_SYMS_H" > $@ @echo "#define $(TARGETNAME)_SYMS_H" >> $@ @$(OBJDUMP) -EB -t -marm $(OUTPUT).elf | grep 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@