xref: /linux/arch/riscv/kernel/Makefile (revision c22b0bcb1dd024cb9caad9230e3a387d8b061df5)
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
767d94577SGuo RenCFLAGS_REMOVE_ftrace.o	= $(CC_FLAGS_FTRACE)
867d94577SGuo RenCFLAGS_REMOVE_patch.o	= $(CC_FLAGS_FTRACE)
95ad84adfSGuo RenCFLAGS_REMOVE_sbi.o	= $(CC_FLAGS_FTRACE)
1010626c32SAlan Kaoendif
1110626c32SAlan Kao
12fbe934d6SPalmer Dabbeltextra-y += head.o
13fbe934d6SPalmer Dabbeltextra-y += vmlinux.lds
14fbe934d6SPalmer Dabbelt
15335b1390SDamien Le Moalobj-y	+= soc.o
16fbe934d6SPalmer Dabbeltobj-y	+= cpu.o
17fbe934d6SPalmer Dabbeltobj-y	+= cpufeature.o
18fbe934d6SPalmer Dabbeltobj-y	+= entry.o
19fbe934d6SPalmer Dabbeltobj-y	+= irq.o
20fbe934d6SPalmer Dabbeltobj-y	+= process.o
21fbe934d6SPalmer Dabbeltobj-y	+= ptrace.o
22fbe934d6SPalmer Dabbeltobj-y	+= reset.o
23fbe934d6SPalmer Dabbeltobj-y	+= setup.o
24fbe934d6SPalmer Dabbeltobj-y	+= signal.o
25fbe934d6SPalmer Dabbeltobj-y	+= syscall_table.o
26fbe934d6SPalmer Dabbeltobj-y	+= sys_riscv.o
27fbe934d6SPalmer Dabbeltobj-y	+= time.o
28fbe934d6SPalmer Dabbeltobj-y	+= traps.o
29fbe934d6SPalmer Dabbeltobj-y	+= riscv_ksyms.o
30fbe934d6SPalmer Dabbeltobj-y	+= stacktrace.o
31fbe934d6SPalmer Dabbeltobj-y	+= cacheinfo.o
32043cb41aSZong Liobj-y	+= patch.o
33*c22b0bcbSGuo Renobj-y	+= probes/
346bd33e1eSChristoph Hellwigobj-$(CONFIG_MMU) += vdso.o vdso/
35fbe934d6SPalmer Dabbelt
362bc3fc87SAnup Patelobj-$(CONFIG_RISCV_M_MODE)	+= traps_misaligned.o
379671f706SAlan Kaoobj-$(CONFIG_FPU)		+= fpu.o
38fbe934d6SPalmer Dabbeltobj-$(CONFIG_SMP)		+= smpboot.o
39fbe934d6SPalmer Dabbeltobj-$(CONFIG_SMP)		+= smp.o
402875fe05SAtish Patraobj-$(CONFIG_SMP)		+= cpu_ops.o
412875fe05SAtish Patraobj-$(CONFIG_SMP)		+= cpu_ops_spinwait.o
42fbe934d6SPalmer Dabbeltobj-$(CONFIG_MODULES)		+= module.o
43ab1ef68eSZong Liobj-$(CONFIG_MODULE_SECTIONS)	+= module-sections.o
44c15ac4fdSAlan Kao
45c15ac4fdSAlan Kaoobj-$(CONFIG_FUNCTION_TRACER)	+= mcount.o ftrace.o
46c15ac4fdSAlan Kaoobj-$(CONFIG_DYNAMIC_FTRACE)	+= mcount-dyn.o
47fbe934d6SPalmer Dabbelt
4848084c35SKefeng Wangobj-$(CONFIG_RISCV_BASE_PMU)	+= perf_event.o
49dbeb90b0SMao Hanobj-$(CONFIG_PERF_EVENTS)	+= perf_callchain.o
5098a93b0bSMao Hanobj-$(CONFIG_HAVE_PERF_REGS)	+= perf_regs.o
513320648eSChristoph Hellwigobj-$(CONFIG_RISCV_SBI)		+= sbi.o
52cfafe260SAtish Patraifeq ($(CONFIG_RISCV_SBI), y)
53cfafe260SAtish Patraobj-$(CONFIG_SMP) += cpu_ops_sbi.o
54cfafe260SAtish Patraendif
55f1e58583SAtish Patraobj-$(CONFIG_HOTPLUG_CPU)	+= cpu-hotplug.o
56fe89bd2bSVincent Chenobj-$(CONFIG_KGDB)		+= kgdb.o
57178e9fc4SAlan Kao
58ebc00ddeSEmil Renner Berthingobj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
59ebc00ddeSEmil Renner Berthing
60b91540d5SAtish Patraobj-$(CONFIG_EFI)		+= efi.o
61