Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # arch/v850/Makefile |
| 3 | # |
Miles Bader | f307d36 | 2005-07-27 11:44:53 -0700 | [diff] [blame^] | 4 | # Copyright (C) 2001,02,03,05 NEC Corporation |
| 5 | # Copyright (C) 2001,02,03,05 Miles Bader <miles@gnu.org> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | # |
| 7 | # This file is included by the global makefile so that you can add your own |
| 8 | # architecture-specific flags and dependencies. Remember to do have actions |
| 9 | # for "archclean" and "archdep" for cleaning up and making dependencies for |
| 10 | # this architecture |
| 11 | # |
| 12 | # This file is subject to the terms and conditions of the GNU General Public |
| 13 | # License. See the file "COPYING" in the main directory of this archive |
| 14 | # for more details. |
| 15 | # |
| 16 | |
| 17 | arch_dir = arch/v850 |
| 18 | |
| 19 | CFLAGS += -mv850e |
| 20 | # r16 is a fixed pointer to the current task |
| 21 | CFLAGS += -ffixed-r16 -mno-prolog-function |
| 22 | CFLAGS += -fno-builtin |
| 23 | CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\" |
| 24 | |
Miles Bader | f307d36 | 2005-07-27 11:44:53 -0700 | [diff] [blame^] | 25 | # By default, build a kernel that runs on the gdb v850 simulator. |
| 26 | KBUILD_DEFCONFIG := sim_defconfig |
| 27 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | # This prevents the linker from consolidating the .gnu.linkonce.this_module |
| 29 | # section into .text (which the v850 default linker script for -r does for |
| 30 | # some reason) |
| 31 | LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module |
| 32 | |
| 33 | OBJCOPY_FLAGS_BLOB := -I binary -O elf32-little -B v850e |
| 34 | |
| 35 | |
| 36 | head-y := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o |
| 37 | core-y += $(arch_dir)/kernel/ |
| 38 | libs-y += $(arch_dir)/lib/ |
| 39 | |
| 40 | |
| 41 | # Deal with the initial contents of the root device |
| 42 | ifdef ROOT_FS_IMAGE |
| 43 | core-y += root_fs_image.o |
| 44 | |
| 45 | # Because the kernel build-system erases all explicit .o build rules, we |
| 46 | # have to use an intermediate target to fool it into building for us. |
| 47 | # This results in it being built anew each time, but that's alright. |
| 48 | root_fs_image.o: root_fs_image_force |
| 49 | |
| 50 | root_fs_image_force: $(ROOT_FS_IMAGE) |
| 51 | $(OBJCOPY) $(OBJCOPY_FLAGS_BLOB) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o |
| 52 | endif |
| 53 | |
| 54 | |
| 55 | prepare: include/asm-$(ARCH)/asm-consts.h |
| 56 | |
| 57 | # Generate constants from C code for use by asm files |
| 58 | arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \ |
| 59 | include/config/MARKER |
| 60 | |
| 61 | include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s |
| 62 | $(call filechk,gen-asm-offsets) |
| 63 | |
| 64 | CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \ |
| 65 | arch/$(ARCH)/kernel/asm-consts.s \ |
| 66 | root_fs_image.o |