Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / sh64 / boot / compressed / Makefile
blob9cd2167188565cc6afe6c850f990933d7940bc48
2 # linux/arch/sh64/boot/compressed/Makefile
4 # This file is subject to the terms and conditions of the GNU General Public
5 # License. See the file "COPYING" in the main directory of this archive
6 # for more details.
8 # Copyright (C) 2002 Stuart Menefy
9 # Copyright (C) 2004 Paul Mundt
11 # create a compressed vmlinux image from the original vmlinux
14 targets := vmlinux vmlinux.bin vmlinux.bin.gz \
15 head.o misc.o cache.o piggy.o vmlinux.lds
17 EXTRA_AFLAGS := -traditional
19 OBJECTS := $(obj)/head.o $(obj)/misc.o $(obj)/cache.o
22 # ZIMAGE_OFFSET is the load offset of the compression loader
23 # (4M for the kernel plus 64K for this loader)
25 ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
27 LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
28 -T $(obj)/../../kernel/vmlinux.lds \
29 --no-warn-mismatch
31 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
32 $(call if_changed,ld)
35 $(obj)/vmlinux.bin: vmlinux FORCE
36 $(call if_changed,objcopy)
38 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
39 $(call if_changed,gzip)
41 LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
42 OBJCOPYFLAGS += -R .empty_zero_page
44 $(obj)/piggy.o: $(obj)/vmlinux.lds $(obj)/vmlinux.bin.gz FORCE
45 $(call if_changed,ld)