blob: d8bbd3207100db2a2408aa35fadc1ac01b387e06 [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -07002#
3# Makefile for the RISC-V Linux kernel
4#
5
Alan Kao10626c32017-12-18 17:52:48 +08006ifdef CONFIG_FTRACE
Zong Li043cb412020-03-10 00:55:43 +08007CFLAGS_REMOVE_ftrace.o = -pg
8CFLAGS_REMOVE_patch.o = -pg
Alan Kao10626c32017-12-18 17:52:48 +08009endif
10
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070011extra-y += head.o
12extra-y += vmlinux.lds
13
Damien Le Moal335b1392020-03-16 09:47:38 +090014obj-y += soc.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070015obj-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
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070030obj-y += cacheinfo.o
Zong Li043cb412020-03-10 00:55:43 +080031obj-y += patch.o
Christoph Hellwig6bd33e12019-10-28 13:10:41 +010032obj-$(CONFIG_MMU) += vdso.o vdso/
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070033
Damien Le Moal956d7052020-03-16 09:47:36 +090034obj-$(CONFIG_RISCV_M_MODE) += clint.o traps_misaligned.o
Alan Kao9671f702018-10-09 10:18:33 +080035obj-$(CONFIG_FPU) += fpu.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070036obj-$(CONFIG_SMP) += smpboot.o
37obj-$(CONFIG_SMP) += smp.o
Atish Patra2875fe02020-03-17 18:11:40 -070038obj-$(CONFIG_SMP) += cpu_ops.o
39obj-$(CONFIG_SMP) += cpu_ops_spinwait.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070040obj-$(CONFIG_MODULES) += module.o
Zong Liab1ef682018-03-15 16:50:41 +080041obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o
Alan Kaoc15ac4f2018-02-13 13:13:17 +080042
43obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
44obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070045
Kefeng Wang48084c32020-05-07 23:04:45 +080046obj-$(CONFIG_RISCV_BASE_PMU) += perf_event.o
Mao Handbeb90b2019-08-29 14:57:00 +080047obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
Mao Han98a93b02019-09-05 11:46:35 +080048obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
Christoph Hellwig33206482019-10-28 13:10:35 +010049obj-$(CONFIG_RISCV_SBI) += sbi.o
Atish Patracfafe262020-03-17 18:11:43 -070050ifeq ($(CONFIG_RISCV_SBI), y)
51obj-$(CONFIG_SMP) += cpu_ops_sbi.o
52endif
Atish Patraf1e58582020-03-17 18:11:44 -070053obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o
Alan Kao178e9fc2018-04-20 07:27:49 +080054
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070055clean: