Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63e6b9a0b876a287782a706351e0868789673f90
Commit:     63e6b9a0b876a287782a706351e0868789673f90
Parent:     1333a694836cb7e561b1b70d60ccceb8fabeead2
Author:     Jesper Nilsson <[EMAIL PROTECTED]>
AuthorDate: Fri Nov 30 16:11:38 2007 +0100
Committer:  Jesper Nilsson <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 11:06:25 2008 +0100

    CRIS v10: Update rescue Kbuild makefile.
    
    - Remove old specific targets, use more generic ones instead.
    - Use if_changed to avoid creating new images when no change.
      Removes a lot of cruft.
    - Use EXTRA_CFLAGS instead of CFLAGS.
---
 arch/cris/arch-v10/boot/rescue/Makefile |   94 ++++++++++++------------------
 1 files changed, 38 insertions(+), 56 deletions(-)

diff --git a/arch/cris/arch-v10/boot/rescue/Makefile 
b/arch/cris/arch-v10/boot/rescue/Makefile
dissimilarity index 71%
index 8be9b31..911c894 100644
--- a/arch/cris/arch-v10/boot/rescue/Makefile
+++ b/arch/cris/arch-v10/boot/rescue/Makefile
@@ -1,56 +1,38 @@
-#
-# Makefile for rescue code
-#
-target = $(target_rescue_dir)
-src    = $(src_rescue_dir)
-
-CC = gcc-cris -mlinux $(LINUXINCLUDE)
-CFLAGS = -O2
-LD = gcc-cris -mlinux -nostdlib
-OBJCOPY = objcopy-cris
-OBJCOPYFLAGS = -O binary --remove-section=.bss
-
-all: $(target)/rescue.bin $(target)/testrescue.bin $(target)/kimagerescue.bin
-
-$(target)/rescue.bin: $(target) $(target)/head.o
-       $(LD) -T $(src)/rescue.ld -o $(target)/rescue.o $(target)/head.o
-       $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/rescue.o $(target)/rescue.bin
-# Place a copy in top-level build directory
-       cp -p $(target)/rescue.bin $(objtree)
-
-$(target)/testrescue.bin: $(target) $(target)/testrescue.o
-       $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/testrescue.o tr.bin
-# Pad it to 784 bytes
-       dd if=/dev/zero of=tmp2423 bs=1 count=784
-       cat tr.bin tmp2423 >testrescue_tmp.bin
-       dd if=testrescue_tmp.bin of=$(target)/testrescue.bin bs=1 count=784
-       rm tr.bin tmp2423 testrescue_tmp.bin
-
-$(target)/kimagerescue.bin: $(target) $(target)/kimagerescue.o
-       $(OBJCOPY) $(OBJCOPYFLAGS) $(target)/kimagerescue.o ktr.bin
-# Pad it to 784 bytes, that's what the rescue loader expects
-       dd if=/dev/zero of=tmp2423 bs=1 count=784
-       cat ktr.bin tmp2423 >kimagerescue_tmp.bin
-       dd if=kimagerescue_tmp.bin of=$(target)/kimagerescue.bin bs=1 count=784
-       rm ktr.bin tmp2423 kimagerescue_tmp.bin
-
-$(target):
-       mkdir -p $(target)
-
-$(target)/head.o: $(src)/head.S
-       $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
-
-$(target)/testrescue.o: $(src)/testrescue.S
-       $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
-
-$(target)/kimagerescue.o: $(src)/kimagerescue.S
-       $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
-
-clean:
-       rm -f $(target)/*.o $(target)/*.bin
-
-fastdep:
-
-modules:
-
-modules-install:
+#
+# Makefile for rescue (bootstrap) code
+#
+
+CC = gcc-cris -mlinux $(LINUXINCLUDE)
+EXTRA_CFLAGS = -O2
+AFLAGS = -traditional
+LD = gcc-cris -mlinux -nostdlib
+LDFLAGS = -T $(obj)/rescue.ld
+OBJCOPY = objcopy-cris
+OBJCOPYFLAGS = -O binary --remove-section=.bss
+obj-$(CONFIG_ETRAX_AXISFLASHMAP) = head.o
+OBJECT := $(obj)/head.o
+
+targets := rescue.o rescue.bin
+
+$(obj)/rescue.o: $(OBJECT) FORCE
+       $(call if_changed,ld)
+
+$(obj)/rescue.bin: $(obj)/rescue.o FORCE
+       $(call if_changed,objcopy)
+       cp -p $(obj)/rescue.bin $(objtree)
+
+$(obj)/testrescue.bin: $(obj)/testrescue.o
+       $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/testrescue.o tr.bin
+# Pad it to 784 bytes
+       dd if=/dev/zero of=tmp2423 bs=1 count=784
+       cat tr.bin tmp2423 >testrescue_tmp.bin
+       dd if=testrescue_tmp.bin of=$(obj)/testrescue.bin bs=1 count=784
+       rm tr.bin tmp2423 testrescue_tmp.bin
+
+$(obj)/kimagerescue.bin: $(obj)/kimagerescue.o
+       $(OBJCOPY) $(OBJCOPYFLAGS) $(obj)/kimagerescue.o ktr.bin
+# Pad it to 784 bytes, that's what the rescue loader expects
+       dd if=/dev/zero of=tmp2423 bs=1 count=784
+       cat ktr.bin tmp2423 >kimagerescue_tmp.bin
+       dd if=kimagerescue_tmp.bin of=$(obj)/kimagerescue.bin bs=1 count=784
+       rm ktr.bin tmp2423 kimagerescue_tmp.bin
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to