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