Thomas Gleixner | ec8f24b | 2019-05-19 13:07:45 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 2 | # |
| 3 | # Makefile for the RISC-V Linux kernel |
| 4 | # |
| 5 | |
Alan Kao | 10626c3 | 2017-12-18 17:52:48 +0800 | [diff] [blame] | 6 | ifdef CONFIG_FTRACE |
Zong Li | 043cb41 | 2020-03-10 00:55:43 +0800 | [diff] [blame] | 7 | CFLAGS_REMOVE_ftrace.o = -pg |
| 8 | CFLAGS_REMOVE_patch.o = -pg |
Alan Kao | 10626c3 | 2017-12-18 17:52:48 +0800 | [diff] [blame] | 9 | endif |
| 10 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 11 | extra-y += head.o |
| 12 | extra-y += vmlinux.lds |
| 13 | |
Damien Le Moal | 335b139 | 2020-03-16 09:47:38 +0900 | [diff] [blame] | 14 | obj-y += soc.o |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 15 | obj-y += cpu.o |
| 16 | obj-y += cpufeature.o |
| 17 | obj-y += entry.o |
| 18 | obj-y += irq.o |
| 19 | obj-y += process.o |
| 20 | obj-y += ptrace.o |
| 21 | obj-y += reset.o |
| 22 | obj-y += setup.o |
| 23 | obj-y += signal.o |
| 24 | obj-y += syscall_table.o |
| 25 | obj-y += sys_riscv.o |
| 26 | obj-y += time.o |
| 27 | obj-y += traps.o |
| 28 | obj-y += riscv_ksyms.o |
| 29 | obj-y += stacktrace.o |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 30 | obj-y += cacheinfo.o |
Zong Li | 043cb41 | 2020-03-10 00:55:43 +0800 | [diff] [blame] | 31 | obj-y += patch.o |
Christoph Hellwig | 6bd33e1 | 2019-10-28 13:10:41 +0100 | [diff] [blame] | 32 | obj-$(CONFIG_MMU) += vdso.o vdso/ |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 33 | |
Damien Le Moal | 956d705 | 2020-03-16 09:47:36 +0900 | [diff] [blame] | 34 | obj-$(CONFIG_RISCV_M_MODE) += clint.o traps_misaligned.o |
Alan Kao | 9671f70 | 2018-10-09 10:18:33 +0800 | [diff] [blame] | 35 | obj-$(CONFIG_FPU) += fpu.o |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 36 | obj-$(CONFIG_SMP) += smpboot.o |
| 37 | obj-$(CONFIG_SMP) += smp.o |
Atish Patra | 2875fe0 | 2020-03-17 18:11:40 -0700 | [diff] [blame] | 38 | obj-$(CONFIG_SMP) += cpu_ops.o |
| 39 | obj-$(CONFIG_SMP) += cpu_ops_spinwait.o |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 40 | obj-$(CONFIG_MODULES) += module.o |
Zong Li | ab1ef68 | 2018-03-15 16:50:41 +0800 | [diff] [blame] | 41 | obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o |
Alan Kao | c15ac4f | 2018-02-13 13:13:17 +0800 | [diff] [blame] | 42 | |
| 43 | obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o |
| 44 | obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 45 | |
Kefeng Wang | 48084c3 | 2020-05-07 23:04:45 +0800 | [diff] [blame^] | 46 | obj-$(CONFIG_RISCV_BASE_PMU) += perf_event.o |
Mao Han | dbeb90b | 2019-08-29 14:57:00 +0800 | [diff] [blame] | 47 | obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o |
Mao Han | 98a93b0 | 2019-09-05 11:46:35 +0800 | [diff] [blame] | 48 | obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o |
Christoph Hellwig | 3320648 | 2019-10-28 13:10:35 +0100 | [diff] [blame] | 49 | obj-$(CONFIG_RISCV_SBI) += sbi.o |
Atish Patra | cfafe26 | 2020-03-17 18:11:43 -0700 | [diff] [blame] | 50 | ifeq ($(CONFIG_RISCV_SBI), y) |
| 51 | obj-$(CONFIG_SMP) += cpu_ops_sbi.o |
| 52 | endif |
Atish Patra | f1e5858 | 2020-03-17 18:11:44 -0700 | [diff] [blame] | 53 | obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o |
Alan Kao | 178e9fc | 2018-04-20 07:27:49 +0800 | [diff] [blame] | 54 | |
Palmer Dabbelt | fbe934d | 2017-07-10 18:08:08 -0700 | [diff] [blame] | 55 | clean: |