blob: 81652ab893e130d2c13a6e18646421fa776dfb45 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#
Greg Ungerer66d857b2011-03-22 13:39:27 +10002# arch/m68k/Makefile
Linus Torvalds1da177e2005-04-16 15:20:36 -07003#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8# (C) Copyright 2002, Greg Ungerer <gerg@snapgear.com>
9#
10
11platform-$(CONFIG_M68328) := 68328
12platform-$(CONFIG_M68EZ328) := 68EZ328
13platform-$(CONFIG_M68VZ328) := 68VZ328
14platform-$(CONFIG_M68360) := 68360
15platform-$(CONFIG_M5206) := 5206
16platform-$(CONFIG_M5206e) := 5206e
Greg Ungerer9ed8a0d2005-11-07 14:09:50 +100017platform-$(CONFIG_M520x) := 520x
Greg Ungerer777354b2005-09-02 10:42:52 +100018platform-$(CONFIG_M523x) := 523x
Linus Torvalds1da177e2005-04-16 15:20:36 -070019platform-$(CONFIG_M5249) := 5249
20platform-$(CONFIG_M527x) := 527x
21platform-$(CONFIG_M5272) := 5272
22platform-$(CONFIG_M528x) := 528x
23platform-$(CONFIG_M5307) := 5307
Matt Waddel9a6404b2006-06-27 12:50:53 +100024platform-$(CONFIG_M532x) := 532x
Linus Torvalds1da177e2005-04-16 15:20:36 -070025platform-$(CONFIG_M5407) := 5407
Greg Ungerer5b2e6552010-11-02 12:05:29 +100026platform-$(CONFIG_M54xx) := 54xx
Linus Torvalds1da177e2005-04-16 15:20:36 -070027PLATFORM := $(platform-y)
28
29board-$(CONFIG_PILOT) := pilot
Greg Ungerer33e7a722007-07-25 22:07:20 +100030board-$(CONFIG_UC5272) := UC5272
31board-$(CONFIG_UC5282) := UC5282
Linus Torvalds1da177e2005-04-16 15:20:36 -070032board-$(CONFIG_UCSIMM) := ucsimm
33board-$(CONFIG_UCDIMM) := ucdimm
34board-$(CONFIG_UCQUICC) := uCquicc
35board-$(CONFIG_DRAGEN2) := de2
36board-$(CONFIG_ARNEWSH) := ARNEWSH
Greg Ungerer9ed8a0d2005-11-07 14:09:50 +100037board-$(CONFIG_FREESCALE) := FREESCALE
Greg Ungerer777354b2005-09-02 10:42:52 +100038board-$(CONFIG_M5235EVB) := M5235EVB
Linus Torvalds1da177e2005-04-16 15:20:36 -070039board-$(CONFIG_M5271EVB) := M5271EVB
40board-$(CONFIG_M5275EVB) := M5275EVB
41board-$(CONFIG_M5282EVB) := M5282EVB
42board-$(CONFIG_ELITE) := eLITE
Linus Torvalds1da177e2005-04-16 15:20:36 -070043board-$(CONFIG_NETtel) := NETtel
44board-$(CONFIG_SECUREEDGEMP3) := MP3
45board-$(CONFIG_CLEOPATRA) := CLEOPATRA
46board-$(CONFIG_senTec) := senTec
47board-$(CONFIG_SNEHA) := SNEHA
Greg Ungerer9ed8a0d2005-11-07 14:09:50 +100048board-$(CONFIG_M5208EVB) := M5208EVB
Greg Ungerer777354b2005-09-02 10:42:52 +100049board-$(CONFIG_MOD5272) := MOD5272
Daniel Alomar121036e2006-06-27 12:49:11 +100050board-$(CONFIG_AVNET) := AVNET
Wilson Callanada8d212007-10-23 14:37:54 +100051board-$(CONFIG_SAVANT) := SAVANT
Linus Torvalds1da177e2005-04-16 15:20:36 -070052BOARD := $(board-y)
53
54model-$(CONFIG_RAMKERNEL) := ram
55model-$(CONFIG_ROMKERNEL) := rom
56MODEL := $(model-y)
57
58#
59# Some code support is grouped together for a common cpu-subclass (for
60# example all ColdFire cpu's are very similar). Determine the sub-class
61# for the selected cpu. ONLY need to define this for the non-base member
62# of the family.
63#
Greg Ungerer6d386792008-02-01 17:37:56 +100064cpuclass-$(CONFIG_M5206) := coldfire
65cpuclass-$(CONFIG_M5206e) := coldfire
66cpuclass-$(CONFIG_M520x) := coldfire
67cpuclass-$(CONFIG_M523x) := coldfire
68cpuclass-$(CONFIG_M5249) := coldfire
69cpuclass-$(CONFIG_M527x) := coldfire
70cpuclass-$(CONFIG_M5272) := coldfire
71cpuclass-$(CONFIG_M528x) := coldfire
72cpuclass-$(CONFIG_M5307) := coldfire
73cpuclass-$(CONFIG_M532x) := coldfire
74cpuclass-$(CONFIG_M5407) := coldfire
Greg Ungerer5b2e6552010-11-02 12:05:29 +100075cpuclass-$(CONFIG_M54xx) := coldfire
Linus Torvalds1da177e2005-04-16 15:20:36 -070076cpuclass-$(CONFIG_M68328) := 68328
77cpuclass-$(CONFIG_M68EZ328) := 68328
78cpuclass-$(CONFIG_M68VZ328) := 68328
79cpuclass-$(CONFIG_M68360) := 68360
80CPUCLASS := $(cpuclass-y)
81
82ifneq ($(CPUCLASS),$(PLATFORM))
Greg Ungerer66d857b2011-03-22 13:39:27 +100083CLASSDIR := arch/m68k/platform/$(cpuclass-y)/
Linus Torvalds1da177e2005-04-16 15:20:36 -070084endif
85
86export PLATFORM BOARD MODEL CPUCLASS
87
88#
89# Some CFLAG additions based on specific CPU type.
90#
Greg Ungererb4d63e82009-03-30 10:29:45 +100091cflags-$(CONFIG_M5206) := $(call cc-option,-mcpu=5206,-m5200)
Greg Ungererc9942c52010-11-18 12:52:08 +100092cflags-$(CONFIG_M5206e) := $(call cc-option,-mcpu=5206e,-m5200)
Greg Ungererb4d63e82009-03-30 10:29:45 +100093cflags-$(CONFIG_M520x) := $(call cc-option,-mcpu=5208,-m5200)
Sebastian Siewiora6260ef2008-05-09 16:10:37 +020094cflags-$(CONFIG_M523x) := $(call cc-option,-mcpu=523x,-m5307)
Greg Ungererb4d63e82009-03-30 10:29:45 +100095cflags-$(CONFIG_M5249) := $(call cc-option,-mcpu=5249,-m5200)
Sebastian Siewiora6260ef2008-05-09 16:10:37 +020096cflags-$(CONFIG_M5271) := $(call cc-option,-mcpu=5271,-m5307)
Philip Nyeeb79cbe2010-01-12 10:18:03 +100097cflags-$(CONFIG_M5272) := $(call cc-option,-mcpu=5272,-m5307)
Sebastian Siewiora6260ef2008-05-09 16:10:37 +020098cflags-$(CONFIG_M5275) := $(call cc-option,-mcpu=5275,-m5307)
Greg Ungererc9942c52010-11-18 12:52:08 +100099cflags-$(CONFIG_M528x) := $(call cc-option,-mcpu=528x,-m5307)
100cflags-$(CONFIG_M5307) := $(call cc-option,-mcpu=5307,-m5200)
Sebastian Siewiora6260ef2008-05-09 16:10:37 +0200101cflags-$(CONFIG_M532x) := $(call cc-option,-mcpu=532x,-m5307)
Greg Ungererc9942c52010-11-18 12:52:08 +1000102cflags-$(CONFIG_M5407) := $(call cc-option,-mcpu=5407,-m5200)
103cflags-$(CONFIG_M54xx) := $(call cc-option,-mcpu=5475,-m5200)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104cflags-$(CONFIG_M68328) := -m68000
105cflags-$(CONFIG_M68EZ328) := -m68000
106cflags-$(CONFIG_M68VZ328) := -m68000
107cflags-$(CONFIG_M68360) := -m68332
108
Sam Ravnborg222d3942007-10-15 21:59:31 +0200109KBUILD_AFLAGS += $(cflags-y)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700110
Sam Ravnborga0f97e02007-10-14 22:21:35 +0200111KBUILD_CFLAGS += $(cflags-y)
112KBUILD_CFLAGS += -D__linux__
113KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114
Greg Ungerer66d857b2011-03-22 13:39:27 +1000115head-y := arch/m68k/platform/$(cpuclass-y)/head.o
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116
Greg Ungerer66d857b2011-03-22 13:39:27 +1000117core-y += arch/m68k/kernel/ \
118 arch/m68k/mm/ \
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119 $(CLASSDIR) \
Greg Ungerer66d857b2011-03-22 13:39:27 +1000120 arch/m68k/platform/$(PLATFORM)/
121libs-y += arch/m68k/lib/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122
Linus Torvalds1da177e2005-04-16 15:20:36 -0700123archclean:
Greg Ungererc48f4842007-10-23 14:37:54 +1000124