Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / c6x / Makefile
blobb7aa854f700862e469a5dd5e96b7782bd72a5df7
2 # linux/arch/c6x/Makefile
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.
9 KBUILD_DEFCONFIG := dsk6455_defconfig
11 cflags-y += -mno-dsbt -msdata=none -D__linux__
13 cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
15 KBUILD_CFLAGS_MODULE += -mlong-calls -mno-dsbt -msdata=none
17 CHECKFLAGS +=
19 KBUILD_CFLAGS += $(cflags-y)
20 KBUILD_AFLAGS += $(cflags-y)
22 ifdef CONFIG_CPU_BIG_ENDIAN
23 KBUILD_CFLAGS += -mbig-endian
24 KBUILD_AFLAGS += -mbig-endian
25 LINKFLAGS += -mbig-endian
26 KBUILD_LDFLAGS += -mbig-endian -EB
27 CHECKFLAGS += -D_BIG_ENDIAN
28 endif
30 head-y := arch/c6x/kernel/head.o
31 core-y += arch/c6x/kernel/ arch/c6x/mm/ arch/c6x/platforms/
32 libs-y += arch/c6x/lib/
34 # Default to vmlinux.bin, override when needed
35 all: vmlinux.bin
37 boot := arch/$(ARCH)/boot
39 # Are we making a dtbImage.<boardname> target? If so, crack out the boardname
40 DTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS)))
41 export DTB
43 core-y += $(boot)/dts/
45 # With make 3.82 we cannot mix normal and wildcard targets
47 vmlinux.bin: vmlinux
48 $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
50 dtbImage.%: vmlinux
51 $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
53 archclean:
54 $(Q)$(MAKE) $(clean)=$(boot)
56 define archhelp
57 @echo ' vmlinux.bin - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
58 @echo ' dtbImage.<dt> - ELF image with $(arch)/boot/dts/<dt>.dts linked in'
59 @echo ' - stripped elf with fdt blob'
60 endef