Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. # test for cross compiling
  16. COMPILE_ARCH = $(shell uname -m)
  17. # override top level makefile
  18. AS += -m68020
  19. LDFLAGS := -m m68kelf
  20. LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds
  21. ifneq ($(COMPILE_ARCH),$(ARCH))
  22. # prefix for cross-compiling binaries
  23. CROSS_COMPILE = m68k-linux-gnu-
  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. 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. CFLAGS := $(CFLAGS) -m68040
  36. endif
  37. ifndef CONFIG_M68040
  38. CFLAGS := $(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. CFLAGS := $(subst -fomit-frame-pointer,,$(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_M68040) += arch/m68k/fpsp040/
  66. core-$(CONFIG_M68060) += arch/m68k/ifpsp060/
  67. core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/
  68. all: zImage
  69. lilo: vmlinux
  70. if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
  71. if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
  72. cat vmlinux > $(INSTALL_PATH)/vmlinux
  73. cp System.map $(INSTALL_PATH)/System.map
  74. if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
  75. zImage compressed: vmlinux.gz
  76. vmlinux.gz: vmlinux
  77. ifndef CONFIG_KGDB
  78. cp vmlinux vmlinux.tmp
  79. $(STRIP) vmlinux.tmp
  80. gzip -9c vmlinux.tmp >vmlinux.gz
  81. rm vmlinux.tmp
  82. else
  83. gzip -9c vmlinux >vmlinux.gz
  84. endif
  85. bzImage: vmlinux.bz2
  86. vmlinux.bz2: vmlinux
  87. ifndef CONFIG_KGDB
  88. cp vmlinux vmlinux.tmp
  89. $(STRIP) vmlinux.tmp
  90. bzip2 -1c vmlinux.tmp >vmlinux.bz2
  91. rm vmlinux.tmp
  92. else
  93. bzip2 -1c vmlinux >vmlinux.bz2
  94. endif
  95. archclean:
  96. rm -f vmlinux.gz vmlinux.bz2