]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/sh/boot/compressed/Makefile
kbuild: enable 'make CFLAGS=...' to add additional options to CC
[mirror_ubuntu-artful-kernel.git] / arch / sh / boot / compressed / Makefile
CommitLineData
1da177e4
LT
1#
2# linux/arch/sh/boot/compressed/Makefile
3#
4# create a compressed vmlinux image from the original vmlinux
5#
6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
8EXTRA_AFLAGS := -traditional
9
10OBJECTS = $(obj)/head.o $(obj)/misc.o
11
12ifdef CONFIG_SH_STANDARD_BIOS
13OBJECTS += $(obj)/../../kernel/sh_bios.o
14endif
15
16#
17# IMAGE_OFFSET is the load offset of the compression loader
1da177e4 18#
1f25756a
DM
19IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
20 $$[$(CONFIG_PAGE_OFFSET) + \
21 $(CONFIG_MEMORY_START) + \
22 $(CONFIG_BOOT_LINK_OFFSET)]')
e96636cc 23
a0f97e06 24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
1da177e4
LT
25
26LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds
27
e96636cc
YS
28
29$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
1da177e4
LT
30 $(call if_changed,ld)
31 @:
32
33$(obj)/vmlinux.bin: vmlinux FORCE
34 $(call if_changed,objcopy)
35
36$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
37 $(call if_changed,gzip)
38
39LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh-linux -T
40OBJCOPYFLAGS += -R .empty_zero_page
41
42$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
43 $(call if_changed,ld)