Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6] / arch / cris / arch-v10 / boot / compressed / Makefile
1 #
2 # arch/cris/arch-v10/boot/compressed/Makefile
3 #
4
5 CC = gcc-cris -melf $(LINUXINCLUDE)
6 ccflags-y += -O2
7 LD = ld-cris
8 ldflags-y += -T $(obj)/decompress.ld
9 OBJECTS = $(obj)/head.o $(obj)/misc.o
10 OBJCOPY = objcopy-cris
11 OBJCOPYFLAGS = -O binary --remove-section=.bss
12
13 quiet_cmd_image = BUILD   $@
14 cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
15
16 targets := vmlinux piggy.gz decompress.o decompress.bin
17
18 $(obj)/decompress.o: $(OBJECTS) FORCE
19         $(call if_changed,ld)
20
21 $(obj)/decompress.bin: $(obj)/decompress.o FORCE
22         $(call if_changed,objcopy)
23
24 $(obj)/head.o: $(obj)/head.S .config
25         @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
26
27 $(obj)/misc.o: $(obj)/misc.c .config
28         @$(CC) -D__KERNEL__ -c $< -o $@
29
30 $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
31         $(call if_changed,image)
32
33 $(obj)/piggy.gz: $(obj)/../Image FORCE
34         $(call if_changed,gzip)
35