xref: /linux/arch/arm/kernel/Makefile (revision b68fc09be48edbc47de1a0f3d42ef8adf6c0ac55)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the linux kernel.
4#
5
6CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
7AFLAGS_head.o        := -DTEXT_OFFSET=$(TEXT_OFFSET)
8
9ifdef CONFIG_FUNCTION_TRACER
10CFLAGS_REMOVE_ftrace.o = -pg
11CFLAGS_REMOVE_insn.o = -pg
12CFLAGS_REMOVE_patch.o = -pg
13endif
14
15CFLAGS_REMOVE_return_address.o = -pg
16
17# Object file lists.
18
19obj-y		:= elf.o entry-common.o irq.o opcodes.o \
20		   process.o ptrace.o reboot.o return_address.o \
21		   setup.o signal.o sigreturn_codes.o \
22		   stacktrace.o sys_arm.o time.o traps.o
23
24obj-$(CONFIG_ATAGS)		+= atags_parse.o
25obj-$(CONFIG_ATAGS_PROC)	+= atags_proc.o
26obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += atags_compat.o
27
28ifeq ($(CONFIG_CPU_V7M),y)
29obj-y		+= entry-v7m.o v7m.o
30else
31obj-y		+= entry-armv.o
32endif
33
34obj-$(CONFIG_MMU)		+= bugs.o
35obj-$(CONFIG_CPU_IDLE)		+= cpuidle.o
36obj-$(CONFIG_ISA_DMA_API)	+= dma.o
37obj-$(CONFIG_FIQ)		+= fiq.o fiqasm.o
38obj-$(CONFIG_MODULES)		+= armksyms.o module.o
39obj-$(CONFIG_ARM_MODULE_PLTS)	+= module-plts.o
40obj-$(CONFIG_ISA_DMA)		+= dma-isa.o
41obj-$(CONFIG_PCI)		+= bios32.o isa.o
42obj-$(CONFIG_ARM_CPU_SUSPEND)	+= sleep.o suspend.o
43obj-$(CONFIG_HIBERNATION)	+= hibernate.o
44obj-$(CONFIG_SMP)		+= smp.o
45ifdef CONFIG_MMU
46obj-$(CONFIG_SMP)		+= smp_tlb.o
47endif
48obj-$(CONFIG_HAVE_ARM_SCU)	+= smp_scu.o
49obj-$(CONFIG_HAVE_ARM_TWD)	+= smp_twd.o
50obj-$(CONFIG_ARM_ARCH_TIMER)	+= arch_timer.o
51obj-$(CONFIG_FUNCTION_TRACER)	+= entry-ftrace.o
52obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o insn.o
53obj-$(CONFIG_FUNCTION_GRAPH_TRACER)	+= ftrace.o insn.o
54obj-$(CONFIG_JUMP_LABEL)	+= jump_label.o insn.o patch.o
55obj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o
56# Main staffs in KPROBES are in arch/arm/probes/ .
57obj-$(CONFIG_KPROBES)		+= patch.o insn.o
58obj-$(CONFIG_OABI_COMPAT)	+= sys_oabi-compat.o
59obj-$(CONFIG_ARM_THUMBEE)	+= thumbee.o
60obj-$(CONFIG_KGDB)		+= kgdb.o patch.o
61obj-$(CONFIG_ARM_UNWIND)	+= unwind.o
62obj-$(CONFIG_HAVE_TCM)		+= tcm.o
63obj-$(CONFIG_OF)		+= devtree.o
64obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
65obj-$(CONFIG_SWP_EMULATE)	+= swp_emulate.o
66CFLAGS_swp_emulate.o		:= -Wa,-march=armv7-a
67obj-$(CONFIG_HAVE_HW_BREAKPOINT)	+= hw_breakpoint.o
68
69obj-$(CONFIG_CPU_XSCALE)	+= xscale-cp0.o
70obj-$(CONFIG_CPU_XSC3)		+= xscale-cp0.o
71obj-$(CONFIG_CPU_MOHAWK)	+= xscale-cp0.o
72obj-$(CONFIG_CPU_PJ4)		+= pj4-cp0.o
73obj-$(CONFIG_CPU_PJ4B)		+= pj4-cp0.o
74obj-$(CONFIG_IWMMXT)		+= iwmmxt.o
75obj-$(CONFIG_PERF_EVENTS)	+= perf_regs.o perf_callchain.o
76obj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_xscale.o perf_event_v6.o \
77				   perf_event_v7.o
78AFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
79obj-$(CONFIG_ARM_CPU_TOPOLOGY)  += topology.o
80obj-$(CONFIG_VDSO)		+= vdso.o
81obj-$(CONFIG_EFI)		+= efi.o
82
83ifneq ($(CONFIG_ARCH_EBSA110),y)
84  obj-y		+= io.o
85endif
86obj-$(CONFIG_PARAVIRT)	+= paravirt.o
87
88head-y			:= head$(MMUEXT).o
89obj-$(CONFIG_DEBUG_LL)	+= debug.o
90obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
91
92# This is executed very early using a temporary stack when no memory allocator
93# nor global data is available. Everything has to be allocated on the stack.
94CFLAGS_head-inflate-data.o := $(call cc-option,-Wframe-larger-than=10240)
95obj-$(CONFIG_XIP_DEFLATED_DATA) += head-inflate-data.o
96
97obj-$(CONFIG_ARM_VIRT_EXT)	+= hyp-stub.o
98AFLAGS_hyp-stub.o		:=-Wa,-march=armv7-a
99ifeq ($(CONFIG_ARM_PSCI),y)
100obj-$(CONFIG_SMP)		+= psci_smp.o
101endif
102
103obj-$(CONFIG_HAVE_ARM_SMCCC)	+= smccc-call.o
104
105extra-y := $(head-y) vmlinux.lds
106