xref: /linux/arch/mips/kernel/Makefile (revision 21b30c00f3067001519eda166675c1958b163c91)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# Makefile for the Linux/MIPS kernel.
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds
5957b369cSThomas Gleixnerextra-y		:= head.o vmlinux.lds
61da177e4SLinus Torvalds
790cee759SPaul Burtonobj-y		+= cpu-probe.o branch.o elf.o entry.o genex.o idle.o irq.o \
890cee759SPaul Burton		   process.o prom.o ptrace.o reset.o setup.o signal.o \
990cee759SPaul Burton		   syscall.o time.o topology.o traps.o unaligned.o watch.o \
1090cee759SPaul Burton		   vdso.o
111da177e4SLinus Torvalds
12d2bb0762SWu Zhangjinifdef CONFIG_FUNCTION_TRACER
13538f1952SWu ZhangjinCFLAGS_REMOVE_ftrace.o = -pg
14d2bb0762SWu ZhangjinCFLAGS_REMOVE_early_printk.o = -pg
15e5dcb58aSDavid DaneyCFLAGS_REMOVE_perf_event.o = -pg
16e5dcb58aSDavid DaneyCFLAGS_REMOVE_perf_event_mipsxx.o = -pg
17d2bb0762SWu Zhangjinendif
18d2bb0762SWu Zhangjin
19217dd11eSRalf Baechleobj-$(CONFIG_CEVT_BCM1480)	+= cevt-bcm1480.o
20f772cdb2SRalf Baechleobj-$(CONFIG_CEVT_R4K)		+= cevt-r4k.o
216457d9fcSYoichi Yuasaobj-$(CONFIG_CEVT_DS1287)	+= cevt-ds1287.o
221097c6acSYoichi Yuasaobj-$(CONFIG_CEVT_GT641XX)	+= cevt-gt641xx.o
23217dd11eSRalf Baechleobj-$(CONFIG_CEVT_SB1250)	+= cevt-sb1250.o
24229f773eSAtsushi Nemotoobj-$(CONFIG_CEVT_TXX9)		+= cevt-txx9.o
25217dd11eSRalf Baechleobj-$(CONFIG_CSRC_BCM1480)	+= csrc-bcm1480.o
264247417dSYoichi Yuasaobj-$(CONFIG_CSRC_IOASIC)	+= csrc-ioasic.o
27d7ea335cSSteven J. Hillobj-$(CONFIG_CSRC_R4K)		+= csrc-r4k.o
28217dd11eSRalf Baechleobj-$(CONFIG_CSRC_SB1250)	+= csrc-sb1250.o
2939b8d525SRalf Baechleobj-$(CONFIG_SYNC_R4K)		+= sync-r4k.o
3042f77542SRalf Baechle
3129f9087cSSteven J. Hillobj-$(CONFIG_DEBUG_FS)		+= segment.o
321df0f0ffSAtsushi Nemotoobj-$(CONFIG_STACKTRACE)	+= stacktrace.o
334e6a05feSThiemo Seuferobj-$(CONFIG_MODULES)		+= mips_ksyms.o module.o
34786d35d4SDavid Howellsobj-$(CONFIG_MODULES_USE_ELF_RELA) += module-rela.o
351da177e4SLinus Torvalds
3619e2e172SRalf Baechleobj-$(CONFIG_FTRACE_SYSCALLS)	+= ftrace.o
37538f1952SWu Zhangjinobj-$(CONFIG_FUNCTION_TRACER)	+= mcount.o ftrace.o
38d2bb0762SWu Zhangjin
3991405eb6SFlorian Fainelliobj-$(CONFIG_CPU_R4K_FPU)	+= r4k_fpu.o r4k_switch.o
401da177e4SLinus Torvaldsobj-$(CONFIG_CPU_R3000)		+= r2300_fpu.o r2300_switch.o
412a21c730SFuxin Zhangobj-$(CONFIG_CPU_R6000)		+= r6000_fpu.o r4k_switch.o
422a21c730SFuxin Zhangobj-$(CONFIG_CPU_TX39XX)	+= r2300_fpu.o r2300_switch.o
43a36d8225SDavid Daneyobj-$(CONFIG_CPU_CAVIUM_OCTEON)	+= r4k_fpu.o octeon_switch.o
441da177e4SLinus Torvalds
451da177e4SLinus Torvaldsobj-$(CONFIG_SMP)		+= smp.o
46940f6b48SRalf Baechleobj-$(CONFIG_SMP_UP)		+= smp-up.o
47*21b30c00SFlorian Fainelliobj-$(CONFIG_CPU_BMIPS)		+= smp-bmips.o bmips_vec.o bmips_5xxx_init.o
481da177e4SLinus Torvalds
4941c594abSRalf Baechleobj-$(CONFIG_MIPS_MT)		+= mips-mt.o
50295cbf6dSRalf Baechleobj-$(CONFIG_MIPS_MT_FPAFF)	+= mips-mt-fpaff.o
5141c594abSRalf Baechleobj-$(CONFIG_MIPS_MT_SMP)	+= smp-mt.o
5239b8d525SRalf Baechleobj-$(CONFIG_MIPS_CMP)		+= smp-cmp.o
530ee958e1SPaul Burtonobj-$(CONFIG_MIPS_CPS)		+= smp-cps.o cps-vec.o
54609cf6f2SPaul Burtonobj-$(CONFIG_MIPS_CPS_NS16550)	+= cps-vec-ns16550.o
55a7e07b1aSMarkos Chandrasobj-$(CONFIG_MIPS_SPRAM)	+= spram.o
56340ee4b9SRalf Baechle
57e01402b1SRalf Baechleobj-$(CONFIG_MIPS_VPE_LOADER)	+= vpe.o
5817a1d523SDeng-Cheng Zhuobj-$(CONFIG_MIPS_VPE_LOADER_CMP) += vpe-cmp.o
591a2a6d7eSDeng-Cheng Zhuobj-$(CONFIG_MIPS_VPE_LOADER_MT) += vpe-mt.o
60e01402b1SRalf Baechleobj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o
61da615cf6SDeng-Cheng Zhuobj-$(CONFIG_MIPS_VPE_APSP_API_CMP) += rtlx-cmp.o
622c973ef0SDeng-Cheng Zhuobj-$(CONFIG_MIPS_VPE_APSP_API_MT) += rtlx-mt.o
63e01402b1SRalf Baechle
641da177e4SLinus Torvaldsobj-$(CONFIG_IRQ_CPU_RM7K)	+= irq-rm7000.o
65d5deda6fSRalf Baechleobj-$(CONFIG_MIPS_MSC)		+= irq-msc01.o
668420fd00SAtsushi Nemotoobj-$(CONFIG_IRQ_TXX9)		+= irq_txx9.o
67d5ab1a69SYoichi Yuasaobj-$(CONFIG_IRQ_GT641XX)	+= irq-gt641xx.o
681da177e4SLinus Torvalds
69c1bf207dSDavid Daneyobj-$(CONFIG_KPROBES)		+= kprobes.o
70875d43e7SRalf Baechleobj-$(CONFIG_32BIT)		+= scall32-o32.o
71875d43e7SRalf Baechleobj-$(CONFIG_64BIT)		+= scall64-64.o
7238201fb2SRalf Baechleobj-$(CONFIG_MIPS32_COMPAT)	+= linux32.o ptrace32.o signal32.o
731da177e4SLinus Torvaldsobj-$(CONFIG_MIPS32_N32)	+= binfmt_elfn32.o scall64-n32.o signal_n32.o
7438201fb2SRalf Baechleobj-$(CONFIG_MIPS32_O32)	+= binfmt_elfo32.o scall64-o32.o
751da177e4SLinus Torvalds
7688547001SJason Wesselobj-$(CONFIG_KGDB)		+= kgdb.o
771da177e4SLinus Torvaldsobj-$(CONFIG_PROC_FS)		+= proc.o
78d1e9a4f5SJames Hoganobj-$(CONFIG_MAGIC_SYSRQ)	+= sysrq.o
791da177e4SLinus Torvalds
80875d43e7SRalf Baechleobj-$(CONFIG_64BIT)		+= cpu-bugs64.o
811da177e4SLinus Torvalds
82d865bea4SRalf Baechleobj-$(CONFIG_I8253)		+= i8253.o
83e5c6c8e4SMichael Neuling
84a9aec7feSAtsushi Nemotoobj-$(CONFIG_GPIO_TXX9)		+= gpio_txx9.o
85a9aec7feSAtsushi Nemoto
867aa1c8f4SRalf Baechleobj-$(CONFIG_KEXEC)		+= machine_kexec.o relocate_kernel.o crash.o
877aa1c8f4SRalf Baechleobj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
8836a88530SRalf Baechleobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
897cd93b89SYoichi Yuasaobj-$(CONFIG_EARLY_PRINTK_8250)	+= early_printk_8250.o
90bba90760SDavid Daneyobj-$(CONFIG_SPINLOCK_TEST)	+= spinlock_test.o
91487d70d0SGabor Juhosobj-$(CONFIG_MIPS_MACHINE)	+= mips_machine.o
92b0a668fbSLeonid Yegoshinobj-$(CONFIG_MIPSR2_TO_R6_EMULATOR)	+= mips-r2-to-r6-emul.o
93583bb86fSNicolas Schichan
94a0f97e06SSam 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)
95e7c4782fSRalf Baechle
96e7c4782fSRalf Baechleobj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT)	+= 8250-platform.o
97dde96ca8SRalf Baechle
98e5dcb58aSDavid Daneyobj-$(CONFIG_PERF_EVENTS)	+= perf_event.o
99e5dcb58aSDavid Daneyobj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_mipsxx.o
10014f70012SDeng-Cheng Zhu
10194bb0c1aSDavid Daneyobj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
10240e084a5SRalf Baechleobj-$(CONFIG_UPROBES)		+= uprobes.o
10394bb0c1aSDavid Daney
1049f98f3ddSPaul Burtonobj-$(CONFIG_MIPS_CM)		+= mips-cm.o
1059c38cf44SPaul Burtonobj-$(CONFIG_MIPS_CPC)		+= mips-cpc.o
1069f98f3ddSPaul Burton
107b1d4c6caSJames Hoganobj-$(CONFIG_CPU_PM)		+= pm.o
1083179d37eSPaul Burtonobj-$(CONFIG_MIPS_CPS_PM)	+= pm-cps.o
109b1d4c6caSJames Hogan
11032a7ede6SSteven J. Hill#
11163c2b681SFlorian Fainelli# DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is not
11263c2b681SFlorian Fainelli# safe to unconditionnaly use the assembler -mdsp / -mdspr2 switches
11363c2b681SFlorian Fainelli# here because the compiler may use DSP ASE instructions (such as lwx) in
11463c2b681SFlorian Fainelli# code paths where we cannot check that the CPU we are running on supports it.
11563c2b681SFlorian Fainelli# Proper abstraction using HAVE_AS_DSP and macros is done in
11663c2b681SFlorian Fainelli# arch/mips/include/asm/mipsregs.h.
11732a7ede6SSteven J. Hill#
11832a7ede6SSteven J. Hillifeq ($(CONFIG_CPU_MIPSR2), y)
11932a7ede6SSteven J. HillCFLAGS_DSP 			= -DHAVE_AS_DSP
12032a7ede6SSteven J. Hill
12132a7ede6SSteven J. HillCFLAGS_signal.o			= $(CFLAGS_DSP)
12232a7ede6SSteven J. HillCFLAGS_signal32.o		= $(CFLAGS_DSP)
12332a7ede6SSteven J. HillCFLAGS_process.o		= $(CFLAGS_DSP)
12432a7ede6SSteven J. HillCFLAGS_branch.o			= $(CFLAGS_DSP)
12532a7ede6SSteven J. HillCFLAGS_ptrace.o			= $(CFLAGS_DSP)
12632a7ede6SSteven J. Hillendif
12732a7ede6SSteven J. Hill
128cf72e947SRalf BaechleCPPFLAGS_vmlinux.lds		:= $(KBUILD_CFLAGS)
129