X-Loader: Add SignGP support
[x-loader-sniper.git] / Makefile
index 7a58ea0..3c08ec9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -84,6 +84,11 @@ ALL = x-load.bin System.map
 
 all:           $(ALL)
 
+ift:   $(ALL) x-load.bin.ift
+
+x-load.bin.ift: signGP System.map x-load.bin
+       TEXT_BASE=`grep -w _start System.map|cut -d ' ' -f1`
+       ./signGP x-load.bin $(TEXT_BASE)
  
 x-load.bin:    x-load
                $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
@@ -106,6 +111,9 @@ System.map: x-load
 oneboot:       x-load.bin
                scripts/mkoneboot.sh
 
+signGP:                scripts/signGP.c
+               gcc -O3 -o signGP  $<
+
 #########################################################################
 else
 all install x-load x-load.srec oneboot depend dep:
@@ -177,7 +185,7 @@ clobber:    clean
                | xargs rm -f
        rm -f $(OBJS) *.bak tags TAGS
        rm -fr *.*~
-       rm -f x-load x-load.map $(ALL) 
+       rm -f x-load x-load.map $(ALL) x-load.bin.ift signGP
        rm -f include/asm/proc include/asm/arch
 
 mrproper \