blob: ca20a892021bb6dae74b2ba02e5278efe9cb798d [file] [log] [blame]
Chris Zankel4bedea92005-06-23 22:01:12 -07001#
2# arch/xtensa/boot/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8#
9
10
Milton Miller437374e2007-10-20 03:58:03 -050011# KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
12KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include
Chris Zankel4bedea92005-06-23 22:01:12 -070013HOSTFLAGS += -Iarch/$(ARCH)/boot/include
14
Max Filippov123f15e2013-08-22 18:09:47 +040015BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")
Chris Zankel4bedea92005-06-23 22:01:12 -070016
matt mooney3996eab2011-01-14 06:12:34 -080017export ccflags-y
Chris Zankel4bedea92005-06-23 22:01:12 -070018export BIG_ENDIAN
19
Chris Zankele7d163f2005-06-30 02:58:59 -070020subdir-y := lib
21
Chris Zankel4bedea92005-06-23 22:01:12 -070022# Subdirs for the boot loader(s)
23
24bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
Max Filippov0322cab2012-11-05 07:36:00 +040025bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf boot-uboot
Max Filippov0d456ba2012-11-05 07:37:14 +040026bootdir-$(CONFIG_XTENSA_PLATFORM_XTFPGA) += boot-redboot boot-elf boot-uboot
Chris Zankel4bedea92005-06-23 22:01:12 -070027
Max Filippov9ad79b52012-09-17 05:44:50 +040028zImage Image: $(bootdir-y)
Chris Zankel4bedea92005-06-23 22:01:12 -070029
30$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
31 $(addprefix $(obj)/,$(host-progs))
32 $(Q)$(MAKE) $(build)=$(obj)/$@ $(MAKECMDGOALS)
33
Max Filippov3f5ec292012-11-05 09:10:00 +040034OBJCOPYFLAGS = --strip-all -R .comment -R .note.gnu.build-id -O binary
35
36vmlinux.bin: vmlinux FORCE
37 $(call if_changed,objcopy)
38
39vmlinux.bin.gz: vmlinux.bin FORCE
40 $(call if_changed,gzip)
41
42boot-elf: vmlinux.bin
43boot-redboot: vmlinux.bin.gz
Max Filippov0322cab2012-11-05 07:36:00 +040044boot-uboot: vmlinux.bin.gz