1# SPDX-License-Identifier: GPL-2.0-only 2# 3# Makefile for the RISC-V Linux kernel 4# 5 6ifdef CONFIG_FTRACE 7CFLAGS_REMOVE_ftrace.o = -pg 8CFLAGS_REMOVE_patch.o = -pg 9endif 10 11extra-y += head.o 12extra-y += vmlinux.lds 13 14obj-y += soc.o 15obj-y += cpu.o 16obj-y += cpufeature.o 17obj-y += entry.o 18obj-y += irq.o 19obj-y += process.o 20obj-y += ptrace.o 21obj-y += reset.o 22obj-y += setup.o 23obj-y += signal.o 24obj-y += syscall_table.o 25obj-y += sys_riscv.o 26obj-y += time.o 27obj-y += traps.o 28obj-y += riscv_ksyms.o 29obj-y += stacktrace.o 30obj-y += cacheinfo.o 31obj-y += patch.o 32obj-$(CONFIG_MMU) += vdso.o vdso/ 33 34obj-$(CONFIG_RISCV_M_MODE) += clint.o traps_misaligned.o 35obj-$(CONFIG_FPU) += fpu.o 36obj-$(CONFIG_SMP) += smpboot.o 37obj-$(CONFIG_SMP) += smp.o 38obj-$(CONFIG_SMP) += cpu_ops.o 39obj-$(CONFIG_SMP) += cpu_ops_spinwait.o 40obj-$(CONFIG_MODULES) += module.o 41obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o 42 43obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o 44obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o 45 46obj-$(CONFIG_RISCV_BASE_PMU) += perf_event.o 47obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o 48obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o 49obj-$(CONFIG_RISCV_SBI) += sbi.o 50ifeq ($(CONFIG_RISCV_SBI), y) 51obj-$(CONFIG_SMP) += cpu_ops_sbi.o 52endif 53obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o 54obj-$(CONFIG_KGDB) += kgdb.o 55 56clean: 57