MIPS: SB1250: Include correct header and fix a warning
[linux-2.6/linux-mips.git] / arch / sh / boot / compressed / Makefile
blob5d660b90943b05bb4662ca9209fa1957da60192a
2 # linux/arch/sh/boot/compressed/Makefile
4 # create a compressed vmlinux image from the original vmlinux
7 targets := vmlinux vmlinux.bin vmlinux.bin.gz \
8 vmlinux.bin.bz2 vmlinux.bin.lzma \
9 vmlinux.bin.lzo \
10 head_$(BITS).o misc.o piggy.o
12 OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
15 # IMAGE_OFFSET is the load offset of the compression loader
17 IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
18 $$[$(CONFIG_PAGE_OFFSET) + \
19 $(KERNEL_MEMORY) + \
20 $(CONFIG_BOOT_LINK_OFFSET)]')
22 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
24 ifeq ($(CONFIG_MCOUNT),y)
25 ORIG_CFLAGS := $(KBUILD_CFLAGS)
26 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
27 endif
29 LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
30 -T $(obj)/../../kernel/vmlinux.lds
32 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
33 $(call if_changed,ld)
36 $(obj)/vmlinux.bin: vmlinux FORCE
37 $(call if_changed,objcopy)
39 vmlinux.bin.all-y := $(obj)/vmlinux.bin
41 $(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y) FORCE
42 $(call if_changed,gzip)
43 $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
44 $(call if_changed,bzip2)
45 $(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
46 $(call if_changed,lzma)
47 $(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
48 $(call if_changed,lzo)
50 OBJCOPYFLAGS += -R .empty_zero_page
52 LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
54 $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y) FORCE
55 $(call if_changed,ld)