]> asedeno.scripts.mit.edu Git - linux.git/blob - arch/c6x/Makefile
Merge tag 'fuse-update-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/mszered...
[linux.git] / arch / c6x / Makefile
1 #
2 # linux/arch/c6x/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 KBUILD_DEFCONFIG := dsk6455_defconfig
10
11 cflags-y += -mno-dsbt -msdata=none -D__linux__
12
13 cflags-$(CONFIG_C6X_BIG_KERNEL) += -mlong-calls
14
15 KBUILD_CFLAGS_MODULE   += -mlong-calls -mno-dsbt -msdata=none
16
17 CHECKFLAGS      +=
18
19 KBUILD_CFLAGS   += $(cflags-y)
20 KBUILD_AFLAGS   += $(cflags-y)
21
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
27 LDFLAGS += -EB
28 CHECKFLAGS      += -D_BIG_ENDIAN
29 endif
30
31 head-y          := arch/c6x/kernel/head.o
32 core-y          += arch/c6x/kernel/ arch/c6x/mm/ arch/c6x/platforms/
33 libs-y          += arch/c6x/lib/
34
35 # Default to vmlinux.bin, override when needed
36 all: vmlinux.bin
37
38 boot := arch/$(ARCH)/boot
39
40 # Are we making a dtbImage.<boardname> target? If so, crack out the boardname
41 DTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS)))
42 export DTB
43
44 ifneq ($(DTB),)
45 core-y  += $(boot)/dts/
46 endif
47
48 # With make 3.82 we cannot mix normal and wildcard targets
49
50 vmlinux.bin: vmlinux
51         $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
52
53 dtbImage.%: vmlinux
54         $(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
55
56 archclean:
57         $(Q)$(MAKE) $(clean)=$(boot)
58
59 define archhelp
60   @echo '  vmlinux.bin     - Binary kernel image (arch/$(ARCH)/boot/vmlinux.bin)'
61   @echo '  dtbImage.<dt>   - ELF image with $(arch)/boot/dts/<dt>.dts linked in'
62   @echo '                  - stripped elf with fdt blob'
63 endef