mirror of
https://github.com/wiiu-env/MochaPayload.git
synced 2024-11-13 03:35:07 +01:00
Make sure symbol files are updated if elf changes
This commit is contained in:
parent
0424ff341d
commit
50f00958d8
@ -122,7 +122,7 @@ $(OUTPUT).bin.h: $(OUTPUT).bin
|
|||||||
@raw2c $<
|
@raw2c $<
|
||||||
@cp $(TARGETNAME).c $@
|
@cp $(TARGETNAME).c $@
|
||||||
|
|
||||||
$(OUTPUT)_syms.h:
|
$(OUTPUT)_syms.h: $(OUTPUT).elf
|
||||||
@echo "#ifndef $(TARGETNAME)_SYMS_H" > $@
|
@echo "#ifndef $(TARGETNAME)_SYMS_H" > $@
|
||||||
@echo "#define $(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 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@
|
||||||
|
@ -110,7 +110,7 @@ DEPENDS := $(OFILES:.o=.d)
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# main targets
|
# main targets
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
all : $(OUTPUT).bin.h $(OUTPUT)_syms.h
|
all : $(OUTPUT).bin.h
|
||||||
|
|
||||||
$(OUTPUT).elf : $(OFILES)
|
$(OUTPUT).elf : $(OFILES)
|
||||||
|
|
||||||
@ -122,14 +122,6 @@ $(OUTPUT).bin.h: $(OUTPUT).bin
|
|||||||
@raw2c $<
|
@raw2c $<
|
||||||
@cp $(TARGETNAME).c $@
|
@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)
|
$(OFILES_SRC) : $(HFILES_BIN)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -122,7 +122,7 @@ $(OUTPUT).bin.h: $(OUTPUT).bin
|
|||||||
@raw2c $<
|
@raw2c $<
|
||||||
@cp $(TARGETNAME).c $@
|
@cp $(TARGETNAME).c $@
|
||||||
|
|
||||||
$(OUTPUT)_syms.h:
|
$(OUTPUT)_syms.h: $(OUTPUT).elf
|
||||||
@echo "#ifndef $(TARGETNAME)_SYMS_H" > $@
|
@echo "#ifndef $(TARGETNAME)_SYMS_H" > $@
|
||||||
@echo "#define $(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 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@
|
||||||
|
@ -122,7 +122,7 @@ $(OUTPUT).bin.h: $(OUTPUT).bin
|
|||||||
@raw2c $<
|
@raw2c $<
|
||||||
@cp $(TARGETNAME).c $@
|
@cp $(TARGETNAME).c $@
|
||||||
|
|
||||||
$(OUTPUT)_syms.h:
|
$(OUTPUT)_syms.h: $(OUTPUT).elf
|
||||||
@echo "#ifndef $(TARGETNAME)_SYMS_H" > $@
|
@echo "#ifndef $(TARGETNAME)_SYMS_H" > $@
|
||||||
@echo "#define $(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 'g F .text' | grep -v '.hidden' | awk '{print "#define " $$6 " 0x" $$1}' >> $@
|
||||||
|
Loading…
Reference in New Issue
Block a user