Makefile_mm 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #
  2. # m68k/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) 1994 by Hamish Macdonald
  14. #
  15. # override top level makefile
  16. AS += -m68020
  17. LDFLAGS := -m m68kelf
  18. KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
  19. ifneq ($(SUBARCH),$(ARCH))
  20. ifeq ($(CROSS_COMPILE),)
  21. CROSS_COMPILE := $(call cc-cross-prefix, \
  22. m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-)
  23. endif
  24. endif
  25. ifdef CONFIG_SUN3
  26. LDFLAGS_vmlinux = -N
  27. endif
  28. CHECKFLAGS += -D__mc68000__
  29. # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
  30. KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
  31. # enable processor switch if compiled only for a single cpu
  32. ifndef CONFIG_M68020
  33. ifndef CONFIG_M68030
  34. ifndef CONFIG_M68060
  35. KBUILD_CFLAGS += -m68040
  36. endif
  37. ifndef CONFIG_M68040
  38. KBUILD_CFLAGS += -m68060
  39. endif
  40. endif
  41. endif
  42. ifdef CONFIG_KGDB
  43. # If configured for kgdb support, include debugging infos and keep the
  44. # frame pointer
  45. KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g
  46. endif
  47. ifndef CONFIG_SUN3
  48. head-y := arch/m68k/kernel/head.o
  49. else
  50. head-y := arch/m68k/kernel/sun3-head.o
  51. endif
  52. core-y += arch/m68k/kernel/ arch/m68k/mm/
  53. libs-y += arch/m68k/lib/
  54. core-$(CONFIG_Q40) += arch/m68k/q40/
  55. core-$(CONFIG_AMIGA) += arch/m68k/amiga/
  56. core-$(CONFIG_ATARI) += arch/m68k/atari/
  57. core-$(CONFIG_MAC) += arch/m68k/mac/
  58. core-$(CONFIG_HP300) += arch/m68k/hp300/
  59. core-$(CONFIG_APOLLO) += arch/m68k/apollo/
  60. core-$(CONFIG_MVME147) += arch/m68k/mvme147/
  61. core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/
  62. core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/
  63. core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/
  64. core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/
  65. core-$(CONFIG_NATFEAT) += arch/m68k/emu/
  66. core-$(CONFIG_M68040) += arch/m68k/fpsp040/
  67. core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
  68. core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
  69. all: zImage
  70. lilo: vmlinux
  71. if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
  72. if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
  73. cat vmlinux > $(INSTALL_PATH)/vmlinux
  74. cp System.map $(INSTALL_PATH)/System.map
  75. if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
  76. zImage compressed: vmlinux.gz
  77. vmlinux.gz: vmlinux
  78. ifndef CONFIG_KGDB
  79. cp vmlinux vmlinux.tmp
  80. $(STRIP) vmlinux.tmp
  81. gzip -9c vmlinux.tmp >vmlinux.gz
  82. rm vmlinux.tmp
  83. else
  84. gzip -9c vmlinux >vmlinux.gz
  85. endif
  86. bzImage: vmlinux.bz2
  87. vmlinux.bz2: vmlinux
  88. ifndef CONFIG_KGDB
  89. cp vmlinux vmlinux.tmp
  90. $(STRIP) vmlinux.tmp
  91. bzip2 -1c vmlinux.tmp >vmlinux.bz2
  92. rm vmlinux.tmp
  93. else
  94. bzip2 -1c vmlinux >vmlinux.bz2
  95. endif
  96. archclean:
  97. rm -f vmlinux.gz vmlinux.bz2
  98. install:
  99. sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"