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 4*8212f898SMasahiro Yamada# architecture-specific flags and dependencies. 5f8c4a270SJonas Bonn# 6f8c4a270SJonas Bonn# This file is subject to the terms and conditions of the GNU General Public 7f8c4a270SJonas Bonn# License. See the file "COPYING" in the main directory of this archive 8f8c4a270SJonas Bonn# for more details. 9f8c4a270SJonas Bonn# 10f8c4a270SJonas Bonn# Copyright (C) 1994 by Linus Torvalds 11f8c4a270SJonas Bonn# Modifications for the OpenRISC architecture: 12f8c4a270SJonas Bonn# Copyright (C) 2003 Matjaz Breskvar <phoenix@bsemi.com> 13f8c4a270SJonas Bonn# Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se> 14f8c4a270SJonas Bonn# 15f8c4a270SJonas Bonn# Based on: 16f8c4a270SJonas Bonn# arch/i386/Makefile 17f8c4a270SJonas Bonn 18f8c4a270SJonas BonnKBUILD_DEFCONFIG := or1ksim_defconfig 19f8c4a270SJonas Bonn 20f8c4a270SJonas BonnOBJCOPYFLAGS := -O binary -R .note -R .comment -S 21f8c4a270SJonas BonnLIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 22f8c4a270SJonas Bonn 23ee4f96d0SChen GangKBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ 24f8c4a270SJonas Bonn 25472ab9eeSJoel Stanleyall: vmlinux.bin 26472ab9eeSJoel Stanley 27472ab9eeSJoel Stanleyboot := arch/$(ARCH)/boot 28472ab9eeSJoel Stanley 29f8c4a270SJonas Bonnifeq ($(CONFIG_OPENRISC_HAVE_INST_MUL),y) 30f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-mhard-mul) 31f8c4a270SJonas Bonnelse 32f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-msoft-mul) 33f8c4a270SJonas Bonnendif 34f8c4a270SJonas Bonn 35f8c4a270SJonas Bonnifeq ($(CONFIG_OPENRISC_HAVE_INST_DIV),y) 36f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-mhard-div) 37f8c4a270SJonas Bonnelse 38f8c4a270SJonas Bonn KBUILD_CFLAGS += $(call cc-option,-msoft-div) 39f8c4a270SJonas Bonnendif 40f8c4a270SJonas Bonn 41cf5e6defSThomas Gleixnerhead-y := arch/openrisc/kernel/head.o 42f8c4a270SJonas Bonn 43f8c4a270SJonas Bonnlibs-y += $(LIBGCC) 44f8c4a270SJonas Bonn 45472ab9eeSJoel StanleyPHONY += vmlinux.bin 46472ab9eeSJoel Stanley 47472ab9eeSJoel Stanleyvmlinux.bin: vmlinux 48472ab9eeSJoel Stanley $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 49