Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #
  2. # arch/v850/Makefile
  3. #
  4. # Copyright (C) 2001,02,03,05 NEC Corporation
  5. # Copyright (C) 2001,02,03,05 Miles Bader <miles@gnu.org>
  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. arch_dir = arch/v850
  17. CFLAGS += -mv850e
  18. # r16 is a fixed pointer to the current task
  19. CFLAGS += -ffixed-r16 -mno-prolog-function
  20. CFLAGS += -fno-builtin
  21. CFLAGS += -D__linux__ -DUTS_SYSNAME=\"uClinux\"
  22. # By default, build a kernel that runs on the gdb v850 simulator.
  23. KBUILD_DEFCONFIG := sim_defconfig
  24. # This prevents the linker from consolidating the .gnu.linkonce.this_module
  25. # section into .text (which the v850 default linker script for -r does for
  26. # some reason)
  27. LDFLAGS_MODULE += --unique=.gnu.linkonce.this_module
  28. OBJCOPY_FLAGS_BLOB := -I binary -O elf32-little -B v850e
  29. head-y := $(arch_dir)/kernel/head.o $(arch_dir)/kernel/init_task.o
  30. core-y += $(arch_dir)/kernel/
  31. libs-y += $(arch_dir)/lib/
  32. # Deal with the initial contents of the root device
  33. ifdef ROOT_FS_IMAGE
  34. core-y += root_fs_image.o
  35. # Because the kernel build-system erases all explicit .o build rules, we
  36. # have to use an intermediate target to fool it into building for us.
  37. # This results in it being built anew each time, but that's alright.
  38. root_fs_image.o: root_fs_image_force
  39. root_fs_image_force: $(ROOT_FS_IMAGE)
  40. $(OBJCOPY) $(OBJCOPY_FLAGS_BLOB) --rename-section .data=.root,alloc,load,readonly,data,contents $< root_fs_image.o
  41. endif
  42. CLEAN_FILES += root_fs_image.o