Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # frv/Makefile |
| 3 | # |
| 4 | # This file is included by the global makefile so that you can add your own |
| 5 | # architecture-specific flags and dependencies. Remember to do have actions |
| 6 | # for "archclean" and "archdep" for cleaning up and making dependencies for |
| 7 | # this architecture |
| 8 | # |
| 9 | # This file is subject to the terms and conditions of the GNU General Public |
| 10 | # License. See the file "COPYING" in the main directory of this archive |
| 11 | # for more details. |
| 12 | # |
| 13 | # Copyright (c) 2003, 2004 Red Hat Inc. |
| 14 | # - Written by David Howells <dhowells@redhat.com> |
| 15 | # - Derived from arch/m68knommu/Makefile, |
| 16 | # Copyright (c) 1999,2001 D. Jeff Dionne <jeff@lineo.ca>, |
| 17 | # Rt-Control Inc. / Lineo, Inc. |
| 18 | # |
| 19 | # Copyright (C) 1998,1999 D. Jeff Dionne <jeff@uclinux.org>, |
| 20 | # Kenneth Albanowski <kjahds@kjahds.com>, |
| 21 | # |
| 22 | # Based on arch/m68k/Makefile: |
| 23 | # Copyright (C) 1994 by Hamish Macdonald |
| 24 | # |
| 25 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | ifdef CONFIG_MMU |
| 27 | UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\" |
| 28 | else |
| 29 | UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\" |
| 30 | endif |
| 31 | |
Sam Ravnborg | c9575dc | 2010-07-28 19:33:00 +0200 | [diff] [blame] | 32 | KBUILD_AFLAGS_MODULE += -G0 -mlong-calls |
| 33 | KBUILD_CFLAGS_MODULE += -G0 -mlong-calls |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
| 35 | ifdef CONFIG_GPREL_DATA_8 |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 36 | KBUILD_CFLAGS += -G8 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | else |
| 38 | ifdef CONFIG_GPREL_DATA_4 |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 39 | KBUILD_CFLAGS += -G4 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | else |
| 41 | ifdef CONFIG_GPREL_DATA_NONE |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 42 | KBUILD_CFLAGS += -G0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | endif |
| 44 | endif |
| 45 | endif |
| 46 | |
| 47 | #LDFLAGS_vmlinux := -Map linkmap.txt |
| 48 | |
| 49 | ifdef CONFIG_GC_SECTIONS |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 50 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | endif |
| 52 | |
| 53 | ifndef CONFIG_FRAME_POINTER |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 54 | KBUILD_CFLAGS += -mno-linked-fp |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | endif |
| 56 | |
| 57 | ifdef CONFIG_CPU_FR451_COMPILE |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 58 | KBUILD_CFLAGS += -mcpu=fr450 |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 59 | KBUILD_AFLAGS += -mcpu=fr450 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | else |
| 61 | ifdef CONFIG_CPU_FR551_COMPILE |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 62 | KBUILD_CFLAGS += -mcpu=fr550 |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 63 | KBUILD_AFLAGS += -mcpu=fr550 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | else |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 65 | KBUILD_CFLAGS += -mcpu=fr400 |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 66 | KBUILD_AFLAGS += -mcpu=fr400 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | endif |
| 68 | endif |
| 69 | |
| 70 | # pretend the kernel is going to run on an FR400 with no media-fp unit |
| 71 | # - reserve CC3 for use with atomic ops |
| 72 | # - all the extra registers are dealt with only at context switch time |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 73 | KBUILD_CFLAGS += -mno-fdpic -mgpr-32 -msoft-float -mno-media |
| 74 | KBUILD_CFLAGS += -ffixed-fcc3 -ffixed-cc3 -ffixed-gr15 -ffixed-icc2 |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 75 | KBUILD_AFLAGS += -mno-fdpic |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | |
| 77 | # make sure the .S files get compiled with debug info |
| 78 | # and disable optimisations that are unhelpful whilst debugging |
| 79 | ifdef CONFIG_DEBUG_INFO |
Sam Ravnborg | a0f97e0 | 2007-10-14 22:21:35 +0200 | [diff] [blame] | 80 | #KBUILD_CFLAGS += -O1 |
Sam Ravnborg | 222d394 | 2007-10-15 21:59:31 +0200 | [diff] [blame] | 81 | KBUILD_AFLAGS += -Wa,--gdwarf2 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | endif |
| 83 | |
| 84 | head-y := arch/frv/kernel/head.o arch/frv/kernel/init_task.o |
| 85 | |
| 86 | core-y += arch/frv/kernel/ arch/frv/mm/ |
| 87 | libs-y += arch/frv/lib/ |
| 88 | |
| 89 | core-$(CONFIG_MB93090_MB00) += arch/frv/mb93090-mb00/ |
| 90 | |
| 91 | all: Image |
| 92 | |
| 93 | Image: vmlinux |
| 94 | $(Q)$(MAKE) $(build)=arch/frv/boot $@ |
| 95 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | archclean: |
Al Viro | 00ddaf2 | 2006-09-23 01:22:46 +0100 | [diff] [blame] | 97 | $(Q)$(MAKE) $(clean)=arch/frv/boot |