Blame view

arch/m68k/Makefile 3.11 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  #
  # m68k/Makefile
  #
  # This file is included by the global makefile so that you can add your own
  # architecture-specific flags and dependencies. Remember to do have actions
  # for "archclean" and "archdep" for cleaning up and making dependencies for
  # this architecture
  #
  # This file is subject to the terms and conditions of the GNU General Public
  # License.  See the file "COPYING" in the main directory of this archive
  # for more details.
  #
  # Copyright (C) 1994 by Hamish Macdonald
  #
b739912ef   Adrian Bunk   m68k: make multi_...
15
  KBUILD_DEFCONFIG := multi_defconfig
ef85ecbf1   Adrian Bunk   m68k: use KBUILD_...
16

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