xref: /linux/arch/nios2/boot/compressed/Makefile (revision 71e2f4dd5a65bd8dbca0b77661e75eea471168f8)
1# SPDX-License-Identifier: GPL-2.0
2#
3# create a compressed vmlinux image from the original vmlinux
4#
5
6targets		:= vmlinux head.o misc.o piggy.o vmlinux.lds
7asflags-y	:=
8
9OBJECTS = $(obj)/head.o $(obj)/misc.o
10
11LDFLAGS_vmlinux := -T
12
13$(obj)/vmlinux: $(obj)/vmlinux.lds $(OBJECTS) $(obj)/piggy.o FORCE
14	$(call if_changed,ld)
15
16LDFLAGS_piggy.o := -r --format binary --oformat elf32-littlenios2 -T
17
18$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/../vmlinux.gz FORCE
19	$(call if_changed,ld)
20