xref: /linux/arch/riscv/kernel/Makefile (revision 335b139057ef79dbede01dea6e8c3f47c2b88802)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2fbe934d6SPalmer Dabbelt#
3fbe934d6SPalmer Dabbelt# Makefile for the RISC-V Linux kernel
4fbe934d6SPalmer Dabbelt#
5fbe934d6SPalmer Dabbelt
610626c32SAlan Kaoifdef CONFIG_FTRACE
710626c32SAlan KaoCFLAGS_REMOVE_ftrace.o	= -pg
8043cb41aSZong LiCFLAGS_REMOVE_patch.o	= -pg
910626c32SAlan Kaoendif
1010626c32SAlan Kao
11fbe934d6SPalmer Dabbeltextra-y += head.o
12fbe934d6SPalmer Dabbeltextra-y += vmlinux.lds
13fbe934d6SPalmer Dabbelt
14*335b1390SDamien Le Moalobj-y	+= soc.o
15fbe934d6SPalmer Dabbeltobj-y	+= cpu.o
16fbe934d6SPalmer Dabbeltobj-y	+= cpufeature.o
17fbe934d6SPalmer Dabbeltobj-y	+= entry.o
18fbe934d6SPalmer Dabbeltobj-y	+= irq.o
19fbe934d6SPalmer Dabbeltobj-y	+= process.o
20fbe934d6SPalmer Dabbeltobj-y	+= ptrace.o
21fbe934d6SPalmer Dabbeltobj-y	+= reset.o
22fbe934d6SPalmer Dabbeltobj-y	+= setup.o
23fbe934d6SPalmer Dabbeltobj-y	+= signal.o
24fbe934d6SPalmer Dabbeltobj-y	+= syscall_table.o
25fbe934d6SPalmer Dabbeltobj-y	+= sys_riscv.o
26fbe934d6SPalmer Dabbeltobj-y	+= time.o
27fbe934d6SPalmer Dabbeltobj-y	+= traps.o
28fbe934d6SPalmer Dabbeltobj-y	+= riscv_ksyms.o
29fbe934d6SPalmer Dabbeltobj-y	+= stacktrace.o
30fbe934d6SPalmer Dabbeltobj-y	+= cacheinfo.o
31043cb41aSZong Liobj-y	+= patch.o
326bd33e1eSChristoph Hellwigobj-$(CONFIG_MMU) += vdso.o vdso/
33fbe934d6SPalmer Dabbelt
34956d705dSDamien Le Moalobj-$(CONFIG_RISCV_M_MODE)	+= clint.o traps_misaligned.o
359671f706SAlan Kaoobj-$(CONFIG_FPU)		+= fpu.o
36fbe934d6SPalmer Dabbeltobj-$(CONFIG_SMP)		+= smpboot.o
37fbe934d6SPalmer Dabbeltobj-$(CONFIG_SMP)		+= smp.o
382875fe05SAtish Patraobj-$(CONFIG_SMP)		+= cpu_ops.o
392875fe05SAtish Patraobj-$(CONFIG_SMP)		+= cpu_ops_spinwait.o
40fbe934d6SPalmer Dabbeltobj-$(CONFIG_MODULES)		+= module.o
41ab1ef68eSZong Liobj-$(CONFIG_MODULE_SECTIONS)	+= module-sections.o
42c15ac4fdSAlan Kao
43c15ac4fdSAlan Kaoobj-$(CONFIG_FUNCTION_TRACER)	+= mcount.o ftrace.o
44c15ac4fdSAlan Kaoobj-$(CONFIG_DYNAMIC_FTRACE)	+= mcount-dyn.o
45fbe934d6SPalmer Dabbelt
46178e9fc4SAlan Kaoobj-$(CONFIG_PERF_EVENTS)	+= perf_event.o
47dbeb90b0SMao Hanobj-$(CONFIG_PERF_EVENTS)	+= perf_callchain.o
4898a93b0bSMao Hanobj-$(CONFIG_HAVE_PERF_REGS)	+= perf_regs.o
493320648eSChristoph Hellwigobj-$(CONFIG_RISCV_SBI)		+= sbi.o
50cfafe260SAtish Patraifeq ($(CONFIG_RISCV_SBI), y)
51cfafe260SAtish Patraobj-$(CONFIG_SMP) += cpu_ops_sbi.o
52cfafe260SAtish Patraendif
53f1e58583SAtish Patraobj-$(CONFIG_HOTPLUG_CPU)	+= cpu-hotplug.o
54178e9fc4SAlan Kao
55fbe934d6SPalmer Dabbeltclean:
56