xref: /openbmc/linux/arch/loongarch/boot/Makefile (revision ead384d9)
1fa96b57cSHuacai Chen#
2fa96b57cSHuacai Chen# arch/loongarch/boot/Makefile
3fa96b57cSHuacai Chen#
4fa96b57cSHuacai Chen# Copyright (C) 2020-2022 Loongson Technology Corporation Limited
5fa96b57cSHuacai Chen#
6fa96b57cSHuacai Chen
7fa96b57cSHuacai Chendrop-sections := .comment .note .options .note.gnu.build-id
8fa96b57cSHuacai Chenstrip-flags   := $(addprefix --remove-section=,$(drop-sections)) -S
9fa96b57cSHuacai ChenOBJCOPYFLAGS_vmlinux.efi := -O binary $(strip-flags)
10fa96b57cSHuacai Chen
11fa96b57cSHuacai Chenquiet_cmd_strip = STRIP	  $@
12fa96b57cSHuacai Chen      cmd_strip = $(STRIP) -s -o $@ $<
13fa96b57cSHuacai Chen
14*ead384d9SHuacai Chentargets := vmlinux.elf
15*ead384d9SHuacai Chen$(obj)/vmlinux.elf: vmlinux FORCE
16fa96b57cSHuacai Chen	$(call if_changed,strip)
17*ead384d9SHuacai Chen
18*ead384d9SHuacai Chentargets += vmlinux.efi
19*ead384d9SHuacai Chen$(obj)/vmlinux.efi: vmlinux FORCE
20*ead384d9SHuacai Chen	$(call if_changed,objcopy)
21