Linux Audio

Check our new training course

Linux BSP development engineering services

Need help to port Linux and bootloaders to your hardware?
Loading...
Note: File does not exist in v5.14.15.
 1#
 2# This file is subject to the terms and conditions of the GNU General Public
 3# License.  See the file "COPYING" in the main directory of this archive
 4# for more details.
 5#
 6# This file is included by the global makefile so that you can add your own
 7# architecture-specific flags and dependencies. Remember to do have actions
 8# for "archclean" and "archdep" for cleaning up and making dependencies for
 9# this architecture
10
11# If building with TILERA_ROOT set (i.e. using the Tilera Multicore
12# Development Environment) we can set CROSS_COMPILE based on that.
13# If we're not cross-compiling, make sure we're on the right architecture.
14# Only bother to test for a few common targets, to avoid useless errors.
15ifeq ($(CROSS_COMPILE),)
16  ifdef TILERA_ROOT
17    CROSS_COMPILE := $(TILERA_ROOT)/bin/tile-
18  else
19    goals := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)
20    ifneq ($(strip $(filter vmlinux modules all,$(goals))),)
21      HOST_ARCH := $(shell uname -m)
22      ifneq ($(HOST_ARCH),$(ARCH))
23$(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH))
24      endif
25    endif
26  endif
27endif
28
29ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"")
30KBUILD_CFLAGS   += $(CONFIG_DEBUG_EXTRA_FLAGS)
31endif
32
33LIBGCC_PATH     := \
34  $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
35
36# Provide the path to use for "make defconfig".
37# We default to the newer TILE-Gx architecture if only "tile" is given.
38ifeq ($(ARCH),tile)
39        KBUILD_DEFCONFIG := tilegx_defconfig
40else
41        KBUILD_DEFCONFIG := $(ARCH)_defconfig
42endif
43
44# Used as a file extension when useful, e.g. head_$(BITS).o
45# Not needed for (e.g.) "$(CC) -m32" since the compiler automatically
46# uses the right default anyway.
47export BITS
48ifeq ($(CONFIG_TILEGX),y)
49BITS := 64
50else
51BITS := 32
52endif
53
54head-y		:= arch/tile/kernel/head_$(BITS).o
55
56libs-y		+= arch/tile/lib
57libs-y		+= $(LIBGCC_PATH)
58
59# See arch/tile/Kbuild for content of core part of the kernel
60core-y		+= arch/tile/
61
62ifdef TILERA_ROOT
63INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
64endif
65
66install:
67	install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
68	install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
69	install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)
70
71define archhelp
72	echo '  install         - install kernel into $(INSTALL_PATH)'
73endef