diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-03-21 23:39:27 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-03-25 00:05:13 -0400 |
commit | 66d857b08b8c3ed5c72c361f863cce77d2a978d7 (patch) | |
tree | 47222d86f4d78dc0da31baf64188bd2e4b38ac1e /arch/m68k/Makefile_mm | |
parent | d39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff) |
m68k: merge m68k and m68knommu arch directories
There is a lot of common code that could be shared between the m68k
and m68knommu arch branches. It makes sense to merge the two branches
into a single directory structure so that we can more easily share
that common code.
This is a brute force merge, based on a script from Stephen King
<sfking@fdwdc.com>, which was originally written by Arnd Bergmann
<arnd@arndb.de>.
> The script was inspired by the script Sam Ravnborg used to merge the
> includes from m68knommu. For those files common to both arches but
> differing in content, the m68k version of the file is renamed to
> <file>_mm.<ext> and the m68knommu version of the file is moved into the
> corresponding m68k directory and renamed <file>_no.<ext> and a small
> wrapper file <file>.<ext> is used to select between the two version. Files
> that are common to both but don't differ are removed from the m68knommu
> tree and files and directories that are unique to the m68knommu tree are
> moved to the m68k tree. Finally, the arch/m68knommu tree is removed.
>
> To select between the the versions of the files, the wrapper uses
>
> #ifdef CONFIG_MMU
> #include <file>_mm.<ext>
> #else
> #include <file>_no.<ext>
> #endif
On top of this file merge I have done a simplistic merge of m68k and
m68knommu Kconfig, which primarily attempts to keep existing options and
menus in place. Other than a handful of options being moved it produces
identical .config outputs on m68k and m68knommu targets I tested it on.
With this in place there is now quite a bit of scope for merge cleanups
in future patches.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/Makefile_mm')
-rw-r--r-- | arch/m68k/Makefile_mm | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/arch/m68k/Makefile_mm b/arch/m68k/Makefile_mm new file mode 100644 index 000000000000..d449b6d5aecf --- /dev/null +++ b/arch/m68k/Makefile_mm | |||
@@ -0,0 +1,121 @@ | |||
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 | # override top level makefile | ||
17 | AS += -m68020 | ||
18 | LDFLAGS := -m m68kelf | ||
19 | KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/m68k/kernel/module.lds | ||
20 | ifneq ($(SUBARCH),$(ARCH)) | ||
21 | ifeq ($(CROSS_COMPILE),) | ||
22 | CROSS_COMPILE := $(call cc-cross-prefix, \ | ||
23 | m68k-linux-gnu- m68k-linux- m68k-unknown-linux-gnu-) | ||
24 | endif | ||
25 | endif | ||
26 | |||
27 | ifdef CONFIG_SUN3 | ||
28 | LDFLAGS_vmlinux = -N | ||
29 | endif | ||
30 | |||
31 | CHECKFLAGS += -D__mc68000__ | ||
32 | |||
33 | # without -fno-strength-reduce the 53c7xx.c driver fails ;-( | ||
34 | KBUILD_CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 | ||
35 | |||
36 | # enable processor switch if compiled only for a single cpu | ||
37 | ifndef CONFIG_M68020 | ||
38 | ifndef CONFIG_M68030 | ||
39 | |||
40 | ifndef CONFIG_M68060 | ||
41 | KBUILD_CFLAGS += -m68040 | ||
42 | endif | ||
43 | |||
44 | ifndef CONFIG_M68040 | ||
45 | KBUILD_CFLAGS += -m68060 | ||
46 | endif | ||
47 | |||
48 | endif | ||
49 | endif | ||
50 | |||
51 | ifdef CONFIG_KGDB | ||
52 | # If configured for kgdb support, include debugging infos and keep the | ||
53 | # frame pointer | ||
54 | KBUILD_CFLAGS := $(subst -fomit-frame-pointer,,$(KBUILD_CFLAGS)) -g | ||
55 | endif | ||
56 | |||
57 | ifndef CONFIG_SUN3 | ||
58 | head-y := arch/m68k/kernel/head.o | ||
59 | else | ||
60 | head-y := arch/m68k/kernel/sun3-head.o | ||
61 | endif | ||
62 | |||
63 | core-y += arch/m68k/kernel/ arch/m68k/mm/ | ||
64 | libs-y += arch/m68k/lib/ | ||
65 | |||
66 | core-$(CONFIG_Q40) += arch/m68k/q40/ | ||
67 | core-$(CONFIG_AMIGA) += arch/m68k/amiga/ | ||
68 | core-$(CONFIG_ATARI) += arch/m68k/atari/ | ||
69 | core-$(CONFIG_MAC) += arch/m68k/mac/ | ||
70 | core-$(CONFIG_HP300) += arch/m68k/hp300/ | ||
71 | core-$(CONFIG_APOLLO) += arch/m68k/apollo/ | ||
72 | core-$(CONFIG_MVME147) += arch/m68k/mvme147/ | ||
73 | core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/ | ||
74 | core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/ | ||
75 | core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/ | ||
76 | core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/ | ||
77 | core-$(CONFIG_NATFEAT) += arch/m68k/emu/ | ||
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 | ||
119 | |||
120 | install: | ||
121 | sh $(srctree)/arch/m68k/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)" | ||