mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 08:58:07 +00:00
8212f8986d
Documentation/kbuild/makefiles.rst suggests to use "archclean" for
cleaning arch/$(SRCARCH)/boot/, but it is not a hard requirement.
Since commit d92cc4d516
("kbuild: require all architectures to have
arch/$(SRCARCH)/Kbuild"), we can use the "subdir- += boot" trick for
all architectures. This can take advantage of the parallel option (-j)
for "make clean".
I also cleaned up the comments in arch/$(SRCARCH)/Makefile. The "archdep"
target no longer exists.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
68 lines
2.3 KiB
Makefile
68 lines
2.3 KiB
Makefile
#
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
# for more details.
|
|
#
|
|
# Copyright (C) 2013 Altera Corporation
|
|
# Copyright (C) 1994, 95, 96, 2003 by Wind River Systems
|
|
# Written by Fredrik Markstrom
|
|
#
|
|
# This file is included by the global makefile so that you can add your own
|
|
# architecture-specific flags and dependencies.
|
|
#
|
|
# Nios2 port by Wind River Systems Inc trough:
|
|
# fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com
|
|
|
|
KBUILD_DEFCONFIG := 3c120_defconfig
|
|
|
|
UTS_SYSNAME = Linux
|
|
|
|
export MMU
|
|
|
|
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
|
|
|
|
KBUILD_AFLAGS += -march=r$(CONFIG_NIOS2_ARCH_REVISION)
|
|
|
|
KBUILD_CFLAGS += -pipe -D__linux__ -D__ELF__
|
|
KBUILD_CFLAGS += -march=r$(CONFIG_NIOS2_ARCH_REVISION)
|
|
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_HW_MUL_SUPPORT),-mhw-mul,-mno-hw-mul)
|
|
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_HW_MULX_SUPPORT),-mhw-mulx,-mno-hw-mulx)
|
|
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_HW_DIV_SUPPORT),-mhw-div,-mno-hw-div)
|
|
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_BMX_SUPPORT),-mbmx,-mno-bmx)
|
|
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_CDX_SUPPORT),-mcdx,-mno-cdx)
|
|
KBUILD_CFLAGS += $(if $(CONFIG_NIOS2_FPU_SUPPORT),-mcustom-fpu-cfg=60-1,)
|
|
|
|
KBUILD_CFLAGS += -fno-optimize-sibling-calls
|
|
KBUILD_CFLAGS += -DUTS_SYSNAME=\"$(UTS_SYSNAME)\"
|
|
KBUILD_CFLAGS += -fno-builtin
|
|
KBUILD_CFLAGS += -G 0
|
|
|
|
head-y := arch/nios2/kernel/head.o
|
|
libs-y += arch/nios2/lib/ $(LIBGCC)
|
|
core-y += arch/nios2/kernel/ arch/nios2/mm/
|
|
core-y += arch/nios2/platform/
|
|
|
|
INSTALL_PATH ?= /tftpboot
|
|
nios2-boot := arch/$(ARCH)/boot
|
|
BOOT_TARGETS = vmImage zImage
|
|
PHONY += $(BOOT_TARGETS) install
|
|
KBUILD_IMAGE := $(nios2-boot)/vmImage
|
|
|
|
core-y += $(nios2-boot)/dts/
|
|
|
|
all: vmImage
|
|
|
|
$(BOOT_TARGETS): vmlinux
|
|
$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
|
|
|
|
install:
|
|
sh $(srctree)/$(nios2-boot)/install.sh $(KERNELRELEASE) \
|
|
$(KBUILD_IMAGE) System.map "$(INSTALL_PATH)"
|
|
|
|
define archhelp
|
|
echo '* vmImage - Kernel-only image for U-Boot ($(KBUILD_IMAGE))'
|
|
echo ' install - Install kernel using'
|
|
echo ' (your) ~/bin/$(INSTALLKERNEL) or'
|
|
echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
|
|
echo ' install to $$(INSTALL_PATH)'
|
|
endef
|