Makefile
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:4k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  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. LD += -m m68kelf
  20. ifneq ($(COMPILE_ARCH),$(ARCH))
  21. # prefix for cross-compiling binaries
  22. CROSS_COMPILE = m68k-linux-
  23. endif
  24. ifndef CONFIG_SUN3
  25. LINKFLAGS = -T $(TOPDIR)/arch/m68k/vmlinux.lds
  26. else
  27. LINKFLAGS = -T $(TOPDIR)/arch/m68k/vmlinux-sun3.lds -N
  28. endif
  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 := arch/m68k/kernel/head.o
  49. else
  50. HEAD := arch/m68k/kernel/sun3-head.o
  51. endif 
  52. SUBDIRS += arch/m68k/kernel arch/m68k/mm arch/m68k/lib
  53. CORE_FILES := arch/m68k/kernel/kernel.o arch/m68k/mm/mm.o $(CORE_FILES)
  54. LIBS += arch/m68k/lib/lib.a
  55. ifdef CONFIG_Q40
  56. CORE_FILES := $(CORE_FILES) arch/m68k/q40/q40.o
  57. SUBDIRS := $(SUBDIRS) arch/m68k/q40
  58. endif
  59. ifdef CONFIG_AMIGA
  60. CORE_FILES := $(CORE_FILES) arch/m68k/amiga/amiga.o
  61. SUBDIRS := $(SUBDIRS) arch/m68k/amiga
  62. endif
  63. ifdef CONFIG_ATARI
  64. CORE_FILES := $(CORE_FILES) arch/m68k/atari/atari.o
  65. SUBDIRS := $(SUBDIRS) arch/m68k/atari
  66. endif
  67. ifdef CONFIG_MAC
  68. CORE_FILES := $(CORE_FILES) arch/m68k/mac/mac.o
  69. SUBDIRS := $(SUBDIRS) arch/m68k/mac
  70. endif
  71. ifdef CONFIG_HP300
  72. CORE_FILES := $(CORE_FILES) arch/m68k/hp300/hp300.o
  73. SUBDIRS := $(SUBDIRS) arch/m68k/hp300
  74. endif
  75. ifdef CONFIG_APOLLO
  76. CORE_FILES := $(CORE_FILES) arch/m68k/apollo/apollo.o
  77. SUBDIRS := $(SUBDIRS) arch/m68k/apollo
  78. endif
  79. ifdef CONFIG_MVME147
  80. CORE_FILES := $(CORE_FILES) arch/m68k/mvme147/mvme147.o
  81. SUBDIRS := $(SUBDIRS) arch/m68k/mvme147
  82. endif
  83. ifdef CONFIG_MVME16x
  84. CORE_FILES := $(CORE_FILES) arch/m68k/mvme16x/mvme16x.o
  85. SUBDIRS := $(SUBDIRS) arch/m68k/mvme16x
  86. endif
  87. ifdef CONFIG_BVME6000
  88. CORE_FILES := $(CORE_FILES) arch/m68k/bvme6000/bvme6000.o
  89. SUBDIRS := $(SUBDIRS) arch/m68k/bvme6000
  90. endif
  91. ifdef CONFIG_SUN3X
  92. CORE_FILES := $(CORE_FILES) arch/m68k/sun3x/sun3x.o arch/m68k/sun3/sun3.o
  93. SUBDIRS := $(SUBDIRS) arch/m68k/sun3x arch/m68k/sun3
  94. endif
  95. ifdef CONFIG_SUN3
  96. CORE_FILES := $(CORE_FILES) arch/m68k/sun3/sun3.o arch/m68k/sun3/prom/promlib.a
  97. SUBDIRS := $(SUBDIRS) arch/m68k/sun3 arch/m68k/sun3/prom
  98. endif
  99. ifdef CONFIG_M68040
  100. CORE_FILES := $(CORE_FILES) arch/m68k/fpsp040/fpsp.o
  101. SUBDIRS := $(SUBDIRS) arch/m68k/fpsp040
  102. endif
  103. ifdef CONFIG_M68060
  104. CORE_FILES := $(CORE_FILES) arch/m68k/ifpsp060/ifpsp.o
  105. SUBDIRS := $(SUBDIRS) arch/m68k/ifpsp060
  106. endif
  107. ifdef CONFIG_M68KFPU_EMU
  108. CORE_FILES := $(CORE_FILES) arch/m68k/math-emu/mathemu.o
  109. SUBDIRS := $(SUBDIRS) arch/m68k/math-emu
  110. endif
  111. lilo: vmlinux
  112. if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
  113. if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
  114. cat vmlinux > $(INSTALL_PATH)/vmlinux
  115. cp System.map $(INSTALL_PATH)/System.map
  116. if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
  117. zImage compressed: vmlinux.gz
  118. vmlinux.gz: vmlinux
  119. ifndef CONFIG_KGDB
  120. cp vmlinux vmlinux.tmp
  121. $(STRIP) vmlinux.tmp
  122. gzip -9c vmlinux.tmp >vmlinux.gz
  123. rm vmlinux.tmp
  124. else
  125. gzip -9c vmlinux >vmlinux.gz
  126. endif
  127. bzImage: vmlinux.bz2
  128. vmlinux.bz2: vmlinux
  129. ifndef CONFIG_KGDB
  130. cp vmlinux vmlinux.tmp
  131. $(STRIP) vmlinux.tmp
  132. bzip2 -1c vmlinux.tmp >vmlinux.bz2
  133. rm vmlinux.tmp
  134. else
  135. bzip2 -1c vmlinux >vmlinux.bz2
  136. endif
  137. archclean:
  138. rm -f vmlinux.gz vmlinux.bz2
  139. rm -f arch/m68k/kernel/m68k_defs.h arch/m68k/kernel/m68k_defs.d
  140. archmrproper:
  141. archdep: