xref: /linux/arch/xtensa/boot/Makefile (revision 123f15e669d5a5a2e2f260ba4a5fc2efd93df20e)
14bedea94SChris Zankel#
24bedea94SChris Zankel# arch/xtensa/boot/Makefile
34bedea94SChris Zankel#
44bedea94SChris Zankel# This file is subject to the terms and conditions of the GNU General Public
54bedea94SChris Zankel# License.  See the file "COPYING" in the main directory of this archive
64bedea94SChris Zankel# for more details.
74bedea94SChris Zankel#
84bedea94SChris Zankel#
94bedea94SChris Zankel
104bedea94SChris Zankel
11437374e9SMilton Miller# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
12437374e9SMilton MillerKBUILD_CFLAGS	+= -fno-builtin -Iarch/$(ARCH)/boot/include
134bedea94SChris ZankelHOSTFLAGS	+= -Iarch/$(ARCH)/boot/include
144bedea94SChris Zankel
15*123f15e6SMax FilippovBIG_ENDIAN	:= $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
164bedea94SChris Zankel
173996eabbSmatt mooneyexport ccflags-y
184bedea94SChris Zankelexport BIG_ENDIAN
194bedea94SChris Zankel
20e7d163f7SChris Zankelsubdir-y	:= lib
21e7d163f7SChris Zankel
224bedea94SChris Zankel# Subdirs for the boot loader(s)
234bedea94SChris Zankel
244bedea94SChris Zankelbootdir-$(CONFIG_XTENSA_PLATFORM_ISS)	 += boot-elf
250322cabdSMax Filippovbootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
260d456badSMax Filippovbootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
274bedea94SChris Zankel
289ad79b58SMax FilippovzImage Image: $(bootdir-y)
294bedea94SChris Zankel
304bedea94SChris Zankel$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
314bedea94SChris Zankel	      $(addprefix $(obj)/,$(host-progs))
324bedea94SChris Zankel	$(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
334bedea94SChris Zankel
343f5ec298SMax FilippovOBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
353f5ec298SMax Filippov
363f5ec298SMax Filippovvmlinux.bin: vmlinux FORCE
373f5ec298SMax Filippov	$(call if_changed,objcopy)
383f5ec298SMax Filippov
393f5ec298SMax Filippovvmlinux.bin.gz: vmlinux.bin FORCE
403f5ec298SMax Filippov	$(call if_changed,gzip)
413f5ec298SMax Filippov
423f5ec298SMax Filippovboot-elf: vmlinux.bin
433f5ec298SMax Filippovboot-redboot: vmlinux.bin.gz
440322cabdSMax Filippovboot-uboot: vmlinux.bin.gz
45