1 # SPDX-License-Identifier: GPL-2.0-only
3 # Makefile for the RISC-V Linux kernel
7 CFLAGS_REMOVE_ftrace.o
= -pg
8 CFLAGS_REMOVE_patch.o
= -pg
12 extra-y
+= vmlinux.lds
24 obj-y
+= syscall_table.o
28 obj-y
+= riscv_ksyms.o
32 obj-
$(CONFIG_MMU
) += vdso.o vdso
/
34 obj-
$(CONFIG_RISCV_M_MODE
) += traps_misaligned.o
35 obj-
$(CONFIG_FPU
) += fpu.o
36 obj-
$(CONFIG_SMP
) += smpboot.o
37 obj-
$(CONFIG_SMP
) += smp.o
38 obj-
$(CONFIG_SMP
) += cpu_ops.o
39 obj-
$(CONFIG_SMP
) += cpu_ops_spinwait.o
40 obj-
$(CONFIG_MODULES
) += module.o
41 obj-
$(CONFIG_MODULE_SECTIONS
) += module-sections.o
43 obj-
$(CONFIG_FUNCTION_TRACER
) += mcount.o ftrace.o
44 obj-
$(CONFIG_DYNAMIC_FTRACE
) += mcount-dyn.o
46 obj-
$(CONFIG_RISCV_BASE_PMU
) += perf_event.o
47 obj-
$(CONFIG_PERF_EVENTS
) += perf_callchain.o
48 obj-
$(CONFIG_HAVE_PERF_REGS
) += perf_regs.o
49 obj-
$(CONFIG_RISCV_SBI
) += sbi.o
50 ifeq ($(CONFIG_RISCV_SBI
), y
)
51 obj-
$(CONFIG_SMP
) += cpu_ops_sbi.o
53 obj-
$(CONFIG_HOTPLUG_CPU
) += cpu-hotplug.o
54 obj-
$(CONFIG_KGDB
) += kgdb.o
56 obj-
$(CONFIG_JUMP_LABEL
) += jump_label.o
58 obj-
$(CONFIG_EFI
) += efi.o