CRIS: Merge machine dependent boot/compressed and boot/rescue
[linux-2.6.git] / arch / cris / boot / compressed / Makefile
1 #
2 # arch/cris/boot/compressed/Makefile
3 #
4
5 asflags-y += $(LINUXINCLUDE)
6 ccflags-y += -O2 $(LINUXINCLUDE)
7
8 # asflags-$(CONFIG_ETRAX_ARCH_V32) += -I$(srctree)/include/asm/mach \
9 #                                   -I$(srctree)/include/asm/arch
10 # ccflags-$(CONFIG_ETRAX_ARCH_V32) += -O2 -I$(srctree)/include/asm/mach
11 #                                       -I$(srctree)/include/asm/arch
12
13 arch-$(CONFIG_ETRAX_ARCH_V10) = v10
14 arch-$(CONFIG_ETRAX_ARCH_V32) = v32
15
16 ldflags-y += -T $(srctree)/$(src)/decompress_$(arch-y).lds
17
18 OBJECTS-$(CONFIG_ETRAX_ARCH_V32) = $(obj)/head_v32.o
19 OBJECTS-$(CONFIG_ETRAX_ARCH_V10) = $(obj)/head_v10.o
20 OBJECTS= $(OBJECTS-y) $(obj)/misc.o
21 OBJCOPYFLAGS = -O binary --remove-section=.bss
22
23 quiet_cmd_image = BUILD   $@
24 cmd_image = cat $(obj)/decompress.bin $(obj)/piggy.gz > $@
25
26 targets := vmlinux piggy.gz decompress.o decompress.bin
27
28 $(obj)/decompress.o: $(OBJECTS) FORCE
29         $(call if_changed,ld)
30
31 $(obj)/decompress.bin: $(obj)/decompress.o FORCE
32         $(call if_changed,objcopy)
33
34 $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
35         $(call if_changed,image)
36
37 $(obj)/piggy.gz: $(obj)/../Image FORCE
38         $(call if_changed,gzip)