xref: /OK3568_Linux_fs/kernel/arch/openrisc/Makefile (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# BK Id: %F% %I% %G% %U% %#%
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# This file is included by the global makefile so that you can add your own
4*4882a593Smuzhiyun# architecture-specific flags and dependencies. Remember to do have actions
5*4882a593Smuzhiyun# for "archclean" and "archdep" for cleaning up and making dependencies for
6*4882a593Smuzhiyun# this architecture
7*4882a593Smuzhiyun#
8*4882a593Smuzhiyun# This file is subject to the terms and conditions of the GNU General Public
9*4882a593Smuzhiyun# License.  See the file "COPYING" in the main directory of this archive
10*4882a593Smuzhiyun# for more details.
11*4882a593Smuzhiyun#
12*4882a593Smuzhiyun# Copyright (C) 1994 by Linus Torvalds
13*4882a593Smuzhiyun# Modifications for the OpenRISC architecture:
14*4882a593Smuzhiyun# Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com>
15*4882a593Smuzhiyun# Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
16*4882a593Smuzhiyun#
17*4882a593Smuzhiyun# Based on:
18*4882a593Smuzhiyun# arch/i386/Makefile
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunKBUILD_DEFCONFIG := or1ksim_defconfig
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunOBJCOPYFLAGS    := -O binary -R .note -R .comment -S
23*4882a593SmuzhiyunLIBGCC 		:= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunKBUILD_CFLAGS	+= -pipe -ffixed-r10 -D__linux__
26*4882a593Smuzhiyun
27*4882a593Smuzhiyunifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y)
28*4882a593Smuzhiyun	KBUILD_CFLAGS += $(call cc-option,-mhard-mul)
29*4882a593Smuzhiyunelse
30*4882a593Smuzhiyun	KBUILD_CFLAGS += $(call cc-option,-msoft-mul)
31*4882a593Smuzhiyunendif
32*4882a593Smuzhiyun
33*4882a593Smuzhiyunifeq ($(CONFIG_OPENRISC_HAVE_INST_DIV),y)
34*4882a593Smuzhiyun	KBUILD_CFLAGS += $(call cc-option,-mhard-div)
35*4882a593Smuzhiyunelse
36*4882a593Smuzhiyun	KBUILD_CFLAGS += $(call cc-option,-msoft-div)
37*4882a593Smuzhiyunendif
38*4882a593Smuzhiyun
39*4882a593Smuzhiyunhead-y 		:= arch/openrisc/kernel/head.o
40*4882a593Smuzhiyun
41*4882a593Smuzhiyuncore-y		+= arch/openrisc/lib/ \
42*4882a593Smuzhiyun		   arch/openrisc/kernel/ \
43*4882a593Smuzhiyun		   arch/openrisc/mm/
44*4882a593Smuzhiyunlibs-y		+= $(LIBGCC)
45*4882a593Smuzhiyun
46*4882a593Smuzhiyunifneq '$(CONFIG_OPENRISC_BUILTIN_DTB)' '""'
47*4882a593SmuzhiyunBUILTIN_DTB := y
48*4882a593Smuzhiyunelse
49*4882a593SmuzhiyunBUILTIN_DTB := n
50*4882a593Smuzhiyunendif
51*4882a593Smuzhiyuncore-$(BUILTIN_DTB) += arch/openrisc/boot/dts/
52