2.2.0-final
[davej-history.git] / arch / m68k / Makefile
blobcb60ea26802d5ba2b127255ee74eb08a16f805b9
2 # m68k/Makefile
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
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.
13 # Copyright (C) 1994 by Hamish Macdonald
16 # test for cross compiling
17 COMPILE_ARCH = $(shell uname -m)
19 # override top level makefile
20 AS += -m68020
21 LD += -m m68kelf
22 ifneq ($(COMPILE_ARCH),$(ARCH))
23 # prefix for cross-compiling binaries
24 CROSS_COMPILE = m68k-linux-
25 endif
27 LINKFLAGS = -T $(TOPDIR)/arch/m68k/vmlinux.lds
29 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
30 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
32 # enable processor switch if compiled only for a single cpu
33 ifndef CONFIG_M68020
34 ifndef CONFIG_M68030
36 ifndef CONFIG_M68060
37 CFLAGS := $(CFLAGS) -m68040
38 endif
40 ifndef CONFIG_M68040
41 CFLAGS := $(CFLAGS) -m68060
42 endif
44 endif
45 endif
47 ifdef CONFIG_KGDB
48 # If configured for kgdb support, include debugging infos and keep the
49 # frame pointer
50 CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g
51 endif
53 HEAD := arch/m68k/kernel/head.o
55 SUBDIRS += arch/m68k/kernel arch/m68k/mm arch/m68k/lib
56 CORE_FILES := arch/m68k/kernel/kernel.o arch/m68k/mm/mm.o $(CORE_FILES)
57 LIBS += arch/m68k/lib/lib.a
59 ifdef CONFIG_AMIGA
60 CORE_FILES := $(CORE_FILES) arch/m68k/amiga/amiga.o
61 SUBDIRS := $(SUBDIRS) arch/m68k/amiga
62 endif
64 ifdef CONFIG_ATARI
65 CORE_FILES := $(CORE_FILES) arch/m68k/atari/atari.o
66 SUBDIRS := $(SUBDIRS) arch/m68k/atari
67 endif
69 ifdef CONFIG_MAC
70 CORE_FILES := $(CORE_FILES) arch/m68k/mac/mac.o
71 SUBDIRS := $(SUBDIRS) arch/m68k/mac
72 endif
74 ifdef CONFIG_HP300
75 CORE_FILES := $(CORE_FILES) arch/m68k/hp300/hp300.o
76 SUBDIRS := $(SUBDIRS) arch/m68k/hp300
77 endif
79 ifdef CONFIG_APOLLO
80 CORE_FILES := $(CORE_FILES) arch/m68k/apollo/apollo.o
81 SUBDIRS := $(SUBDIRS) arch/m68k/apollo
82 endif
84 ifdef CONFIG_MVME16x
85 CORE_FILES := $(CORE_FILES) arch/m68k/mvme16x/mvme16x.o
86 SUBDIRS := $(SUBDIRS) arch/m68k/mvme16x
87 endif
89 ifdef CONFIG_BVME6000
90 CORE_FILES := $(CORE_FILES) arch/m68k/bvme6000/bvme6000.o
91 SUBDIRS := $(SUBDIRS) arch/m68k/bvme6000
92 endif
94 ifdef CONFIG_M68040
95 CORE_FILES := $(CORE_FILES) arch/m68k/fpsp040/fpsp.o
96 SUBDIRS := $(SUBDIRS) arch/m68k/fpsp040
97 endif
99 ifdef CONFIG_M68060
100 CORE_FILES := $(CORE_FILES) arch/m68k/ifpsp060/ifpsp.o
101 SUBDIRS := $(SUBDIRS) arch/m68k/ifpsp060
102 endif
104 lilo: vmlinux
105 if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
106 if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
107 cat vmlinux > $(INSTALL_PATH)/vmlinux
108 cp System.map $(INSTALL_PATH)/System.map
109 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
111 zImage compressed: vmlinux.gz
113 vmlinux.gz: vmlinux
115 ifdef CONFIG_KGDB
116 cp vmlinux vmlinux.tmp
117 $(STRIP) vmlinux.tmp
118 gzip -9c vmlinux.tmp >vmlinux.gz
119 rm vmlinux.tmp
120 else
121 gzip -9c vmlinux >vmlinux.gz
122 endif
124 archclean:
125 rm -f vmlinux.gz
126 rm -f arch/m68k/kernel/m68k_defs.h arch/m68k/kernel/m68k_defs.d
128 archmrproper:
130 archdep: