Makefile 3.2 KB

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