1fa96b57cSHuacai Chen# SPDX-License-Identifier: GPL-2.0 2fa96b57cSHuacai Chen# 3fa96b57cSHuacai Chen# Makefile for the Linux/LoongArch kernel. 4fa96b57cSHuacai Chen# 5fa96b57cSHuacai Chen 632164845SMasahiro Yamadaextra-y := vmlinux.lds 7fa96b57cSHuacai Chen 832164845SMasahiro Yamadaobj-y += head.o cpu-probe.o cacheinfo.o env.o setup.o entry.o genex.o \ 9fa96b57cSHuacai Chen traps.o irq.o idle.o process.o dma.o mem.o io.o reset.o switch.o \ 1061a6fcccSHuacai Chen elf.o syscall.o signal.o time.o topology.o inst.o ptrace.o vdso.o \ 1141596803SHuacai Chen alternative.o unwind.o 12fa96b57cSHuacai Chen 13fa96b57cSHuacai Chenobj-$(CONFIG_ACPI) += acpi.o 14fa96b57cSHuacai Chenobj-$(CONFIG_EFI) += efi.o 15fa96b57cSHuacai Chen 16fa96b57cSHuacai Chenobj-$(CONFIG_CPU_HAS_FPU) += fpu.o 17fa96b57cSHuacai Chen 1841596803SHuacai Chenobj-$(CONFIG_ARCH_STRICT_ALIGN) += unaligned.o 1941596803SHuacai Chen 20dbe3ba30SQing Zhangifdef CONFIG_FUNCTION_TRACER 214733f09dSQing Zhang ifndef CONFIG_DYNAMIC_FTRACE 22dbe3ba30SQing Zhang obj-y += mcount.o ftrace.o 23dbe3ba30SQing Zhang CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 244733f09dSQing Zhang else 254733f09dSQing Zhang obj-y += mcount_dyn.o ftrace_dyn.o 264733f09dSQing Zhang CFLAGS_REMOVE_ftrace_dyn.o = $(CC_FLAGS_FTRACE) 274733f09dSQing Zhang endif 28dbe3ba30SQing Zhang CFLAGS_REMOVE_inst.o = $(CC_FLAGS_FTRACE) 29dbe3ba30SQing Zhang CFLAGS_REMOVE_time.o = $(CC_FLAGS_FTRACE) 30dbe3ba30SQing Zhang CFLAGS_REMOVE_perf_event.o = $(CC_FLAGS_FTRACE) 31dbe3ba30SQing Zhangendif 32dbe3ba30SQing Zhang 33fa96b57cSHuacai Chenobj-$(CONFIG_MODULES) += module.o module-sections.o 3493a4fa62SQing Zhangobj-$(CONFIG_STACKTRACE) += stacktrace.o 35fa96b57cSHuacai Chen 36fa96b57cSHuacai Chenobj-$(CONFIG_PROC_FS) += proc.o 37fa96b57cSHuacai Chen 3846859ac8SHuacai Chenobj-$(CONFIG_SMP) += smp.o 3946859ac8SHuacai Chen 40d4b6f156SHuacai Chenobj-$(CONFIG_NUMA) += numa.o 41d4b6f156SHuacai Chen 42dea2df3cSHuacai Chenobj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o 43dea2df3cSHuacai Chen 44d8da19fbSYouling Tangobj-$(CONFIG_RELOCATABLE) += relocate.o 45d8da19fbSYouling Tang 464a03b2acSYouling Tangobj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o 474e62d1d8SYouling Tangobj-$(CONFIG_CRASH_DUMP) += crash_dump.o 484a03b2acSYouling Tang 4949232773SQing Zhangobj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o 5049aef111SQing Zhangobj-$(CONFIG_UNWINDER_PROLOGUE) += unwind_prologue.o 5149232773SQing Zhang 52b37042b2SHuacai Chenobj-$(CONFIG_PERF_EVENTS) += perf_event.o perf_regs.o 53*edffa33cSQing Zhangobj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o 54b37042b2SHuacai Chen 55fa96b57cSHuacai ChenCPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) 56