2 # arch/ubicom32/Makefile
3 # <TODO: Replace with short file description>
5 # (C) Copyright 2009, Ubicom, Inc.
7 # This file is part of the Ubicom32 Linux Kernel Port.
9 # The Ubicom32 Linux Kernel Port is free software: you can redistribute
10 # it and/or modify it under the terms of the GNU General Public License
11 # as published by the Free Software Foundation, either version 2 of the
12 # License, or (at your option) any later version.
14 # The Ubicom32 Linux Kernel Port is distributed in the hope that it
15 # will be useful, but WITHOUT ANY WARRANTY; without even the implied
16 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 # the GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with the Ubicom32 Linux Kernel Port. If not,
21 # see <http://www.gnu.org/licenses/>.
23 # Ubicom32 implementation derived from (with many thanks):
31 # setup the machine name and machine dependent settings
32 machine-
$(CONFIG_UBICOM32_V3
) := ip5k
33 machine-
$(CONFIG_UBICOM32_V4
) := ip7k
34 MACHINE
:= $(machine-y
)
37 model-
$(CONFIG_RAMKERNEL
) := ram
38 model-
$(CONFIG_ROMKERNEL
) := rom
42 CPUCLASS
:= $(cpuclass-y
)
47 # We want the core kernel built using the fastcall ABI but modules need
48 # to be built using the slower calling convention because they could be
49 # loaded out of range for fast calls.
51 CFLAGS_KERNEL
+= -mfastcall
52 CFLAGS_MODULE
+= -mno-fastcall
55 # Some CFLAG additions based on specific CPU type.
57 cflags-
$(CONFIG_UBICOM32_V3
) := -march
=ubicom32v3
-DIP5000
58 cflags-
$(CONFIG_UBICOM32_V4
) := -march
=ubicom32v4
-DIP7000
60 ldflags-
$(CONFIG_LINKER_RELAXATION
) := --relax
61 LDFLAGS_vmlinux
:= $(ldflags-y
)
63 GCCLIBDIR
:= $(dir $(shell $(CC
) $(cflags-y
) -print-libgcc-file-name
))
64 GCC_LIBS
:= $(GCCLIBDIR
)/libgcc.a
66 KBUILD_CFLAGS
+= $(cflags-y
) -ffunction-sections
67 KBUILD_AFLAGS
+= $(cflags-y
)
69 KBUILD_CFLAGS
+= -D__linux__
-Dlinux
70 KBUILD_CFLAGS
+= -DUTS_SYSNAME
=\"uClinux
\"
72 # include any machine specific directory
74 core-y
+= arch
/$(ARCH
)/mach-
$(MACHINE
)/
77 head-y
:= arch
/$(ARCH
)/kernel
/head.o
79 core-y
+= arch
/$(ARCH
)/kernel
/ \
81 arch
/$(ARCH
)/crypto
/ \
82 arch
/$(ARCH
)/mach-common
/
84 drivers-
$(CONFIG_OPROFILE
) += arch
/ubicom32
/oprofile
/
86 libs-y
+= arch
/$(ARCH
)/lib
/
91 # make sure developer has selected a valid board
92 ifeq ($(CONFIG_NOBOARD
),y
)
93 # $(error have to select a valid board file $(CONFIG_NOBOARD), please run kernel config again)
94 _all
: config_board_error
98 @echo
"*************************************************"
99 @echo
"You have not selected a proper board."
100 @echo
"Please run menuconfig (or config) against your"
101 @echo
"kernel and choose your board under Processor"
103 @echo
"*************************************************"