xref: /linux/arch/mips/kernel/Makefile (revision 06d07429858317ded2db7986113a9e0129cd599b)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds#
31da177e4SLinus Torvalds# Makefile for the Linux/MIPS kernel.
41da177e4SLinus Torvalds#
51da177e4SLinus Torvalds
632164845SMasahiro Yamadaextra-y		:= vmlinux.lds
71da177e4SLinus Torvalds
832164845SMasahiro Yamadaobj-y		+= head.o branch.o cmpxchg.o elf.o entry.o genex.o idle.o irq.o \
990cee759SPaul Burton		   process.o prom.o ptrace.o reset.o setup.o signal.o \
1090cee759SPaul Burton		   syscall.o time.o topology.o traps.o unaligned.o watch.o \
11ef462f3bSJustin Chen		   vdso.o cacheinfo.o
121da177e4SLinus Torvalds
1390c68c6dSThomas Bogendoerferifdef CONFIG_CPU_R3K_TLB
1490c68c6dSThomas Bogendoerferobj-y		+= cpu-r3k-probe.o
1590c68c6dSThomas Bogendoerferelse
1690c68c6dSThomas Bogendoerferobj-y		+= cpu-probe.o
1790c68c6dSThomas Bogendoerferendif
1890c68c6dSThomas Bogendoerfer
19d2bb0762SWu Zhangjinifdef CONFIG_FUNCTION_TRACER
201b6bc35aSzhaoxiaoCFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
211b6bc35aSzhaoxiaoCFLAGS_REMOVE_early_printk.o =  $(CC_FLAGS_FTRACE)
221b6bc35aSzhaoxiaoCFLAGS_REMOVE_perf_event.o = $(CC_FLAGS_FTRACE)
231b6bc35aSzhaoxiaoCFLAGS_REMOVE_perf_event_mipsxx.o = $(CC_FLAGS_FTRACE)
24d2bb0762SWu Zhangjinendif
25d2bb0762SWu Zhangjin
26217dd11eSRalf Baechleobj-$(CONFIG_CEVT_BCM1480)	+= cevt-bcm1480.o
27f772cdb2SRalf Baechleobj-$(CONFIG_CEVT_R4K)		+= cevt-r4k.o
286457d9fcSYoichi Yuasaobj-$(CONFIG_CEVT_DS1287)	+= cevt-ds1287.o
291097c6acSYoichi Yuasaobj-$(CONFIG_CEVT_GT641XX)	+= cevt-gt641xx.o
30217dd11eSRalf Baechleobj-$(CONFIG_CEVT_SB1250)	+= cevt-sb1250.o
31229f773eSAtsushi Nemotoobj-$(CONFIG_CEVT_TXX9)		+= cevt-txx9.o
32217dd11eSRalf Baechleobj-$(CONFIG_CSRC_BCM1480)	+= csrc-bcm1480.o
334247417dSYoichi Yuasaobj-$(CONFIG_CSRC_IOASIC)	+= csrc-ioasic.o
34d7ea335cSSteven J. Hillobj-$(CONFIG_CSRC_R4K)		+= csrc-r4k.o
35217dd11eSRalf Baechleobj-$(CONFIG_CSRC_SB1250)	+= csrc-sb1250.o
3639b8d525SRalf Baechleobj-$(CONFIG_SYNC_R4K)		+= sync-r4k.o
3742f77542SRalf Baechle
3829f9087cSSteven J. Hillobj-$(CONFIG_DEBUG_FS)		+= segment.o
391df0f0ffSAtsushi Nemotoobj-$(CONFIG_STACKTRACE)	+= stacktrace.o
40f44374f1SPaul Burtonobj-$(CONFIG_MODULES)		+= module.o
411da177e4SLinus Torvalds
4219e2e172SRalf Baechleobj-$(CONFIG_FTRACE_SYSCALLS)	+= ftrace.o
43538f1952SWu Zhangjinobj-$(CONFIG_FUNCTION_TRACER)	+= mcount.o ftrace.o
44d2bb0762SWu Zhangjin
45a2aea699SPaul Burtonsw-y				:= r4k_switch.o
46a2aea699SPaul Burtonsw-$(CONFIG_CPU_R3000)		:= r2300_switch.o
47a2aea699SPaul Burtonsw-$(CONFIG_CPU_CAVIUM_OCTEON)	:= octeon_switch.o
48a2aea699SPaul Burtonobj-y				+= $(sw-y)
49a2aea699SPaul Burton
50a616c061SThomas Bogendoerferobj-$(CONFIG_MIPS_FP_SUPPORT)	+= fpu-probe.o
5197f7dcbfSPaul Burtonobj-$(CONFIG_CPU_R2300_FPU)	+= r2300_fpu.o
52a2aea699SPaul Burtonobj-$(CONFIG_CPU_R4K_FPU)	+= r4k_fpu.o
531da177e4SLinus Torvalds
541da177e4SLinus Torvaldsobj-$(CONFIG_SMP)		+= smp.o
55940f6b48SRalf Baechleobj-$(CONFIG_SMP_UP)		+= smp-up.o
5621b30c00SFlorian Fainelliobj-$(CONFIG_CPU_BMIPS)		+= smp-bmips.o bmips_vec.o bmips_5xxx_init.o
571da177e4SLinus Torvalds
5841c594abSRalf Baechleobj-$(CONFIG_MIPS_MT)		+= mips-mt.o
59295cbf6dSRalf Baechleobj-$(CONFIG_MIPS_MT_FPAFF)	+= mips-mt-fpaff.o
6041c594abSRalf Baechleobj-$(CONFIG_MIPS_MT_SMP)	+= smp-mt.o
610ee958e1SPaul Burtonobj-$(CONFIG_MIPS_CPS)		+= smp-cps.o cps-vec.o
62609cf6f2SPaul Burtonobj-$(CONFIG_MIPS_CPS_NS16550)	+= cps-vec-ns16550.o
63a7e07b1aSMarkos Chandrasobj-$(CONFIG_MIPS_SPRAM)	+= spram.o
64340ee4b9SRalf Baechle
65e01402b1SRalf Baechleobj-$(CONFIG_MIPS_VPE_LOADER)	+= vpe.o
661a2a6d7eSDeng-Cheng Zhuobj-$(CONFIG_MIPS_VPE_LOADER_MT) += vpe-mt.o
67e01402b1SRalf Baechleobj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o
682c973ef0SDeng-Cheng Zhuobj-$(CONFIG_MIPS_VPE_APSP_API_MT) += rtlx-mt.o
69e01402b1SRalf Baechle
70d5deda6fSRalf Baechleobj-$(CONFIG_MIPS_MSC)		+= irq-msc01.o
718420fd00SAtsushi Nemotoobj-$(CONFIG_IRQ_TXX9)		+= irq_txx9.o
72d5ab1a69SYoichi Yuasaobj-$(CONFIG_IRQ_GT641XX)	+= irq-gt641xx.o
731da177e4SLinus Torvalds
74c1bf207dSDavid Daneyobj-$(CONFIG_KPROBES)		+= kprobes.o
75875d43e7SRalf Baechleobj-$(CONFIG_32BIT)		+= scall32-o32.o
766d92c268SFiroz Khanobj-$(CONFIG_64BIT)		+= scall64-n64.o
7738201fb2SRalf Baechleobj-$(CONFIG_MIPS32_COMPAT)	+= linux32.o ptrace32.o signal32.o
780bb87f05SAl Viroobj-$(CONFIG_MIPS32_N32)	+= scall64-n32.o signal_n32.o
790bb87f05SAl Viroobj-$(CONFIG_MIPS32_O32)	+= scall64-o32.o signal_o32.o
801da177e4SLinus Torvalds
8188547001SJason Wesselobj-$(CONFIG_KGDB)		+= kgdb.o
821da177e4SLinus Torvaldsobj-$(CONFIG_PROC_FS)		+= proc.o
83d1e9a4f5SJames Hoganobj-$(CONFIG_MAGIC_SYSRQ)	+= sysrq.o
841da177e4SLinus Torvalds
85071d2f0bSPaul Burtonobj-$(CONFIG_CPU_R4X00_BUGS64)	+= r4k-bugs64.o
861da177e4SLinus Torvalds
87d865bea4SRalf Baechleobj-$(CONFIG_I8253)		+= i8253.o
88e5c6c8e4SMichael Neuling
89a9aec7feSAtsushi Nemotoobj-$(CONFIG_GPIO_TXX9)		+= gpio_txx9.o
90a9aec7feSAtsushi Nemoto
91279b991bSMatt Redfearnobj-$(CONFIG_RELOCATABLE)	+= relocate.o
92279b991bSMatt Redfearn
93*8cd2accbSBaoquan Heobj-$(CONFIG_KEXEC_CORE)	+= machine_kexec.o relocate_kernel.o crash.o
947aa1c8f4SRalf Baechleobj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
9536a88530SRalf Baechleobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
967cd93b89SYoichi Yuasaobj-$(CONFIG_EARLY_PRINTK_8250)	+= early_printk_8250.o
97bba90760SDavid Daneyobj-$(CONFIG_SPINLOCK_TEST)	+= spinlock_test.o
98b0a668fbSLeonid Yegoshinobj-$(CONFIG_MIPSR2_TO_R6_EMULATOR)	+= mips-r2-to-r6-emul.o
99583bb86fSNicolas Schichan
100a0f97e06SSam RavnborgCFLAGS_cpu-bugs64.o	= $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -x c /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
101e7c4782fSRalf Baechle
1021ddc96bdSTiezhu Yangobj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_regs.o
103e5dcb58aSDavid Daneyobj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_mipsxx.o
10414f70012SDeng-Cheng Zhu
10594bb0c1aSDavid Daneyobj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
10640e084a5SRalf Baechleobj-$(CONFIG_UPROBES)		+= uprobes.o
10794bb0c1aSDavid Daney
1089f98f3ddSPaul Burtonobj-$(CONFIG_MIPS_CM)		+= mips-cm.o
1099c38cf44SPaul Burtonobj-$(CONFIG_MIPS_CPC)		+= mips-cpc.o
1109f98f3ddSPaul Burton
111b1d4c6caSJames Hoganobj-$(CONFIG_CPU_PM)		+= pm.o
1123179d37eSPaul Burtonobj-$(CONFIG_MIPS_CPS_PM)	+= pm-cps.o
113b1d4c6caSJames Hogan
114cf72e947SRalf BaechleCPPFLAGS_vmlinux.lds		:= $(KBUILD_CFLAGS)
115