1f8c4a270SJonas Bonn# BK Id: %F% %I% %G% %U% %#% 2f8c4a270SJonas Bonn# 3f8c4a270SJonas Bonn# This file is included by the global makefile so that you can add your own 4f8c4a270SJonas Bonn# architecture-specific flags and dependencies. Remember to do have actions 5f8c4a270SJonas Bonn# for "archclean" and "archdep" for cleaning up and making dependencies for 6f8c4a270SJonas Bonn# this architecture 7f8c4a270SJonas Bonn# 8f8c4a270SJonas Bonn# This file is subject to the terms and conditions of the GNU General Public 9f8c4a270SJonas Bonn# License. See the file "COPYING" in the main directory of this archive 10f8c4a270SJonas Bonn# for more details. 11f8c4a270SJonas Bonn# 12f8c4a270SJonas Bonn# Copyright (C) 1994 by Linus Torvalds 13f8c4a270SJonas Bonn# Modifications for the OpenRISC architecture: 14f8c4a270SJonas Bonn# Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com> 15f8c4a270SJonas Bonn# Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se> 16f8c4a270SJonas Bonn# 17f8c4a270SJonas Bonn# Based on: 18f8c4a270SJonas Bonn# arch/i386/Makefile 19f8c4a270SJonas Bonn 20f8c4a270SJonas BonnKBUILD_DEFCONFIG := or1ksim_defconfig 21f8c4a270SJonas Bonn 22f8c4a270SJonas BonnOBJCOPYFLAGS := -O binary -R .note -R .comment -S 23f8c4a270SJonas BonnLIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 24f8c4a270SJonas Bonn 25ee4f96d0SChen GangKBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ 26f8c4a270SJonas Bonn 27*472ab9eeSJoel Stanleyall: vmlinux.bin 28*472ab9eeSJoel Stanley 29*472ab9eeSJoel Stanleyboot := arch/$(ARCH)/boot 30*472ab9eeSJoel Stanley 31f8c4a270SJonas Bonnifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) 32f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-mhard-mul) 33f8c4a270SJonas Bonnelse 34f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-msoft-mul) 35f8c4a270SJonas Bonnendif 36f8c4a270SJonas Bonn 37f8c4a270SJonas Bonnifeq ($(CONFIG_OPENRISC_HAVE_INST_DIV),y) 38f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-mhard-div) 39f8c4a270SJonas Bonnelse 40f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-msoft-div) 41f8c4a270SJonas Bonnendif 42f8c4a270SJonas Bonn 43cf5e6defSThomas Gleixnerhead-y := arch/openrisc/kernel/head.o 44f8c4a270SJonas Bonn 45f8c4a270SJonas Bonncore-y += arch/openrisc/lib/ \ 46f8c4a270SJonas Bonn arch/openrisc/kernel/ \ 47f8c4a270SJonas Bonn arch/openrisc/mm/ 48f8c4a270SJonas Bonnlibs-y += $(LIBGCC) 49f8c4a270SJonas Bonn 50f8c4a270SJonas Bonnifneq '$(CONFIG_OPENRISC_BUILTIN_DTB)' '""' 51f8c4a270SJonas BonnBUILTIN_DTB := y 52f8c4a270SJonas Bonnelse 53f8c4a270SJonas BonnBUILTIN_DTB := n 54f8c4a270SJonas Bonnendif 5519fbd6b2SStephen Warrencore-$(BUILTIN_DTB) += arch/openrisc/boot/dts/ 56*472ab9eeSJoel Stanley 57*472ab9eeSJoel StanleyPHONY += vmlinux.bin 58*472ab9eeSJoel Stanley 59*472ab9eeSJoel Stanleyvmlinux.bin: vmlinux 60*472ab9eeSJoel Stanley $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 61*472ab9eeSJoel Stanley 62*472ab9eeSJoel Stanleyarchclean: 63*472ab9eeSJoel Stanley $(Q)$(MAKE) $(clean)=$(boot) 64