Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[deliverable/linux.git] / arch / s390 / boot / compressed / Makefile
CommitLineData
1844c9bc
MS
1#
2# linux/arch/s390/boot/compressed/Makefile
3#
4# create a compressed vmlinux image from the original vmlinux
5#
6
7BITS := $(if $(CONFIG_64BIT),64,31)
8
9targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
d7b081ac
HC
10 vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo misc.o piggy.o \
11 sizes.h head$(BITS).o
1844c9bc
MS
12
13KBUILD_CFLAGS := -m$(BITS) -D__KERNEL__ $(LINUX_INCLUDE) -O2
1a0f2487 14KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
1844c9bc
MS
15KBUILD_CFLAGS += $(cflags-y)
16KBUILD_CFLAGS += $(call cc-option,-mpacked-stack)
17KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
18
19GCOV_PROFILE := n
20
21OBJECTS := $(addprefix $(objtree)/arch/s390/kernel/, head.o sclp.o ebcdic.o)
22OBJECTS += $(obj)/head$(BITS).o $(obj)/misc.o $(obj)/piggy.o
23
24LDFLAGS_vmlinux := --oformat $(LD_BFD) -e startup -T
25$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS)
26 $(call if_changed,ld)
27 @:
28
29sed-sizes := -e 's/^\([0-9a-fA-F]*\) . \(__bss_start\|_end\)$$/\#define SZ\2 0x\1/p'
30
31quiet_cmd_sizes = GEN $@
32 cmd_sizes = $(NM) $< | sed -n $(sed-sizes) > $@
33
34$(obj)/sizes.h: vmlinux
35 $(call if_changed,sizes)
36
37AFLAGS_head$(BITS).o += -I$(obj)
38$(obj)/head$(BITS).o: $(obj)/sizes.h
39
40CFLAGS_misc.o += -I$(obj)
41$(obj)/misc.o: $(obj)/sizes.h
42
43OBJCOPYFLAGS_vmlinux.bin := -R .comment -S
44$(obj)/vmlinux.bin: vmlinux
45 $(call if_changed,objcopy)
46
47vmlinux.bin.all-y := $(obj)/vmlinux.bin
48
49suffix-$(CONFIG_KERNEL_GZIP) := gz
50suffix-$(CONFIG_KERNEL_BZIP2) := bz2
51suffix-$(CONFIG_KERNEL_LZMA) := lzma
cdf56649 52suffix-$(CONFIG_KERNEL_LZO) := lzo
d7b081ac 53suffix-$(CONFIG_KERNEL_XZ) := xz
1844c9bc
MS
54
55$(obj)/vmlinux.bin.gz: $(vmlinux.bin.all-y)
56 $(call if_changed,gzip)
57$(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y)
58 $(call if_changed,bzip2)
59$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y)
60 $(call if_changed,lzma)
cdf56649
HC
61$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y)
62 $(call if_changed,lzo)
d7b081ac
HC
63$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y)
64 $(call if_changed,xzkern)
1844c9bc
MS
65
66LDFLAGS_piggy.o := -r --format binary --oformat $(LD_BFD) -T
67$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix-y)
68 $(call if_changed,ld)
This page took 0.332573 seconds and 5 git commands to generate.