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 head_$(BITS).o misc_$(BITS).o piggy.o
10 OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o
12 ifdef CONFIG_SH_STANDARD_BIOS
13 OBJECTS += $(obj)/../../kernel/sh_bios.o
17 # IMAGE_OFFSET is the load offset of the compression loader
19 IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
20 $$[$(CONFIG_PAGE_OFFSET) + \
22 $(CONFIG_BOOT_LINK_OFFSET)]')
24 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
26 ifeq ($(CONFIG_FUNCTION_TRACER),y)
27 ORIG_CFLAGS := $(KBUILD_CFLAGS)
28 KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
31 LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
32 -T $(obj)/../../kernel/vmlinux.lds
34 $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
38 $(obj)/vmlinux.bin: vmlinux FORCE
39 $(call if_changed,objcopy)
41 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
42 $(call if_changed,gzip)
44 OBJCOPYFLAGS += -R .empty_zero_page
46 $(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
47 $(call if_changed,as_o_S)