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