18c2ecf20Sopenharmony_ci#
28c2ecf20Sopenharmony_ci# linux/arch/c6x/Makefile
38c2ecf20Sopenharmony_ci#
48c2ecf20Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public
58c2ecf20Sopenharmony_ci# License.  See the file "COPYING" in the main directory of this archive
68c2ecf20Sopenharmony_ci# for more details.
78c2ecf20Sopenharmony_ci#
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciKBUILD_DEFCONFIG := dsk6455_defconfig
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_cicflags-y += -mno-dsbt -msdata=none -D__linux__
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_cicflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciKBUILD_CFLAGS_MODULE   += -mlong-calls -mno-dsbt -msdata=none
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ciCHECKFLAGS      +=
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciKBUILD_CFLAGS   += $(cflags-y)
208c2ecf20Sopenharmony_ciKBUILD_AFLAGS   += $(cflags-y)
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciifdef CONFIG_CPU_BIG_ENDIAN
238c2ecf20Sopenharmony_ciKBUILD_CFLAGS   += -mbig-endian
248c2ecf20Sopenharmony_ciKBUILD_AFLAGS   += -mbig-endian
258c2ecf20Sopenharmony_ciLINKFLAGS       += -mbig-endian
268c2ecf20Sopenharmony_ciKBUILD_LDFLAGS  += -mbig-endian -EB
278c2ecf20Sopenharmony_ciCHECKFLAGS	+= -D_BIG_ENDIAN
288c2ecf20Sopenharmony_ciendif
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_cihead-y          := arch/c6x/kernel/head.o
318c2ecf20Sopenharmony_cicore-y          += arch/c6x/kernel/ arch/c6x/mm/ arch/c6x/platforms/
328c2ecf20Sopenharmony_cilibs-y          += arch/c6x/lib/
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci# Default to vmlinux.bin, override when needed
358c2ecf20Sopenharmony_ciall: vmlinux.bin
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ciboot := arch/$(ARCH)/boot
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci# Are we making a dtbImage.<boardname> target? If so, crack out the boardname
408c2ecf20Sopenharmony_ciDTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS)))
418c2ecf20Sopenharmony_ciexport DTB
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_cicore-y	+= $(boot)/dts/
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci# With make 3.82 we cannot mix normal and wildcard targets
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_civmlinux.bin: vmlinux
488c2ecf20Sopenharmony_ci	$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_cidtbImage.%: vmlinux
518c2ecf20Sopenharmony_ci	$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ciarchclean:
548c2ecf20Sopenharmony_ci	$(Q)$(MAKE) $(clean)=$(boot)
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_cidefine archhelp
578c2ecf20Sopenharmony_ci  @echo '  vmlinux.bin     - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
588c2ecf20Sopenharmony_ci  @echo '  dtbImage.<dt>   - ELF image with $(arch)/boot/dts/<dt>.dts linked in'
598c2ecf20Sopenharmony_ci  @echo '                  - stripped elf with fdt blob'
608c2ecf20Sopenharmony_ciendef
61