Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # |
| 2 | # Makefile for the Linux/MIPS kernel. |
| 3 | # |
| 4 | |
Thomas Gleixner | 957b369 | 2012-05-03 09:02:55 +0000 | [diff] [blame] | 5 | extra-y := head.o vmlinux.lds |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Paul Burton | 90cee75 | 2014-09-11 08:30:22 +0100 | [diff] [blame] | 7 | obj-y += cpu-probe.o branch.o elf.o entry.o genex.o idle.o irq.o \ |
| 8 | process.o prom.o ptrace.o reset.o setup.o signal.o \ |
| 9 | syscall.o time.o topology.o traps.o unaligned.o watch.o \ |
| 10 | vdso.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | |
Wu Zhangjin | d2bb0762 | 2009-11-20 20:34:29 +0800 | [diff] [blame] | 12 | ifdef CONFIG_FUNCTION_TRACER |
Wu Zhangjin | 538f195 | 2009-11-20 20:34:32 +0800 | [diff] [blame] | 13 | CFLAGS_REMOVE_ftrace.o = -pg |
Wu Zhangjin | d2bb0762 | 2009-11-20 20:34:29 +0800 | [diff] [blame] | 14 | CFLAGS_REMOVE_early_printk.o = -pg |
David Daney | e5dcb58 | 2011-09-24 02:29:55 +0200 | [diff] [blame] | 15 | CFLAGS_REMOVE_perf_event.o = -pg |
| 16 | CFLAGS_REMOVE_perf_event_mipsxx.o = -pg |
Wu Zhangjin | d2bb0762 | 2009-11-20 20:34:29 +0800 | [diff] [blame] | 17 | endif |
| 18 | |
Ralf Baechle | 217dd11 | 2007-11-01 01:57:55 +0000 | [diff] [blame] | 19 | obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm1480.o |
Ralf Baechle | f772cdb | 2012-11-30 17:27:27 +0100 | [diff] [blame] | 20 | obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o |
Yoichi Yuasa | 6457d9f | 2008-04-25 12:11:44 +0900 | [diff] [blame] | 21 | obj-$(CONFIG_CEVT_DS1287) += cevt-ds1287.o |
Yoichi Yuasa | 1097c6a | 2007-10-22 19:43:15 +0900 | [diff] [blame] | 22 | obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o |
Ralf Baechle | 217dd11 | 2007-11-01 01:57:55 +0000 | [diff] [blame] | 23 | obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o |
Atsushi Nemoto | 229f773 | 2007-10-25 01:34:09 +0900 | [diff] [blame] | 24 | obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o |
Ralf Baechle | 217dd11 | 2007-11-01 01:57:55 +0000 | [diff] [blame] | 25 | obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o |
Yoichi Yuasa | 4247417 | 2008-04-24 09:48:40 +0900 | [diff] [blame] | 26 | obj-$(CONFIG_CSRC_IOASIC) += csrc-ioasic.o |
Steven J. Hill | d7ea335 | 2012-11-14 23:34:17 -0600 | [diff] [blame] | 27 | obj-$(CONFIG_CSRC_R4K) += csrc-r4k.o |
Ralf Baechle | 217dd11 | 2007-11-01 01:57:55 +0000 | [diff] [blame] | 28 | obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o |
Ralf Baechle | 39b8d52 | 2008-04-28 17:14:26 +0100 | [diff] [blame] | 29 | obj-$(CONFIG_SYNC_R4K) += sync-r4k.o |
Ralf Baechle | 42f7754 | 2007-10-18 17:48:11 +0100 | [diff] [blame] | 30 | |
Steven J. Hill | 29f9087 | 2013-11-14 16:12:32 +0000 | [diff] [blame] | 31 | obj-$(CONFIG_DEBUG_FS) += segment.o |
Atsushi Nemoto | 1df0f0f | 2006-09-26 23:44:01 +0900 | [diff] [blame] | 32 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
Thiemo Seufer | 4e6a05f | 2005-02-21 10:45:09 +0000 | [diff] [blame] | 33 | obj-$(CONFIG_MODULES) += mips_ksyms.o module.o |
David Howells | 786d35d | 2012-09-28 14:31:03 +0930 | [diff] [blame] | 34 | obj-$(CONFIG_MODULES_USE_ELF_RELA) += module-rela.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Ralf Baechle | 19e2e17 | 2012-07-13 23:38:17 +0200 | [diff] [blame] | 36 | obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o |
Wu Zhangjin | 538f195 | 2009-11-20 20:34:32 +0800 | [diff] [blame] | 37 | obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o |
Wu Zhangjin | d2bb0762 | 2009-11-20 20:34:29 +0800 | [diff] [blame] | 38 | |
Florian Fainelli | 91405eb | 2012-01-31 18:18:44 +0100 | [diff] [blame] | 39 | obj-$(CONFIG_CPU_R4K_FPU) += r4k_fpu.o r4k_switch.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o |
Fuxin Zhang | 2a21c73 | 2007-06-06 14:52:43 +0800 | [diff] [blame] | 41 | obj-$(CONFIG_CPU_R6000) += r6000_fpu.o r4k_switch.o |
Fuxin Zhang | 2a21c73 | 2007-06-06 14:52:43 +0800 | [diff] [blame] | 42 | obj-$(CONFIG_CPU_TX39XX) += r2300_fpu.o r2300_switch.o |
David Daney | a36d822 | 2014-05-28 23:52:04 +0200 | [diff] [blame] | 43 | obj-$(CONFIG_CPU_CAVIUM_OCTEON) += r4k_fpu.o octeon_switch.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | |
| 45 | obj-$(CONFIG_SMP) += smp.o |
Ralf Baechle | 940f6b4 | 2007-11-24 22:33:28 +0000 | [diff] [blame] | 46 | obj-$(CONFIG_SMP_UP) += smp-up.o |
Florian Fainelli | 21b30c0 | 2016-02-03 18:14:50 -0800 | [diff] [blame] | 47 | obj-$(CONFIG_CPU_BMIPS) += smp-bmips.o bmips_vec.o bmips_5xxx_init.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | |
Ralf Baechle | 41c594a | 2006-04-05 09:45:45 +0100 | [diff] [blame] | 49 | obj-$(CONFIG_MIPS_MT) += mips-mt.o |
Ralf Baechle | 295cbf6 | 2007-07-03 14:37:43 +0100 | [diff] [blame] | 50 | obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o |
Ralf Baechle | 41c594a | 2006-04-05 09:45:45 +0100 | [diff] [blame] | 51 | obj-$(CONFIG_MIPS_MT_SMP) += smp-mt.o |
Ralf Baechle | 39b8d52 | 2008-04-28 17:14:26 +0100 | [diff] [blame] | 52 | obj-$(CONFIG_MIPS_CMP) += smp-cmp.o |
Paul Burton | 0ee958e | 2014-01-15 10:31:53 +0000 | [diff] [blame] | 53 | obj-$(CONFIG_MIPS_CPS) += smp-cps.o cps-vec.o |
Paul Burton | 609cf6f | 2015-09-22 11:12:11 -0700 | [diff] [blame] | 54 | obj-$(CONFIG_MIPS_CPS_NS16550) += cps-vec-ns16550.o |
Markos Chandras | a7e07b1 | 2014-11-13 13:32:03 +0000 | [diff] [blame] | 55 | obj-$(CONFIG_MIPS_SPRAM) += spram.o |
Ralf Baechle | 340ee4b | 2005-08-17 17:44:08 +0000 | [diff] [blame] | 56 | |
Ralf Baechle | e01402b | 2005-07-14 15:57:16 +0000 | [diff] [blame] | 57 | obj-$(CONFIG_MIPS_VPE_LOADER) += vpe.o |
Deng-Cheng Zhu | 17a1d52 | 2013-10-30 15:52:07 -0500 | [diff] [blame] | 58 | obj-$(CONFIG_MIPS_VPE_LOADER_CMP) += vpe-cmp.o |
Deng-Cheng Zhu | 1a2a6d7 | 2013-10-30 15:52:06 -0500 | [diff] [blame] | 59 | obj-$(CONFIG_MIPS_VPE_LOADER_MT) += vpe-mt.o |
Ralf Baechle | 7034228 | 2013-01-22 12:59:30 +0100 | [diff] [blame] | 60 | obj-$(CONFIG_MIPS_VPE_APSP_API) += rtlx.o |
Deng-Cheng Zhu | da615cf | 2014-01-01 16:29:03 +0100 | [diff] [blame] | 61 | obj-$(CONFIG_MIPS_VPE_APSP_API_CMP) += rtlx-cmp.o |
Deng-Cheng Zhu | 2c973ef | 2014-01-01 16:26:46 +0100 | [diff] [blame] | 62 | obj-$(CONFIG_MIPS_VPE_APSP_API_MT) += rtlx-mt.o |
Ralf Baechle | e01402b | 2005-07-14 15:57:16 +0000 | [diff] [blame] | 63 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o |
Ralf Baechle | d5deda6 | 2008-07-15 18:44:34 +0100 | [diff] [blame] | 65 | obj-$(CONFIG_MIPS_MSC) += irq-msc01.o |
Atsushi Nemoto | 8420fd0 | 2007-08-02 23:35:53 +0900 | [diff] [blame] | 66 | obj-$(CONFIG_IRQ_TXX9) += irq_txx9.o |
Yoichi Yuasa | d5ab1a6 | 2007-09-13 23:51:26 +0900 | [diff] [blame] | 67 | obj-$(CONFIG_IRQ_GT641XX) += irq-gt641xx.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | |
David Daney | c1bf207 | 2010-08-03 11:22:20 -0700 | [diff] [blame] | 69 | obj-$(CONFIG_KPROBES) += kprobes.o |
Ralf Baechle | 875d43e | 2005-09-03 15:56:16 -0700 | [diff] [blame] | 70 | obj-$(CONFIG_32BIT) += scall32-o32.o |
| 71 | obj-$(CONFIG_64BIT) += scall64-64.o |
Ralf Baechle | 38201fb | 2007-02-15 01:53:00 +0000 | [diff] [blame] | 72 | obj-$(CONFIG_MIPS32_COMPAT) += linux32.o ptrace32.o signal32.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 73 | obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o |
Harvey Hunt | d1e63c9 | 2016-06-17 16:03:45 +0100 | [diff] [blame] | 74 | obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o signal_o32.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | |
Jason Wessel | 8854700 | 2008-07-29 15:58:53 -0500 | [diff] [blame] | 76 | obj-$(CONFIG_KGDB) += kgdb.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 77 | obj-$(CONFIG_PROC_FS) += proc.o |
James Hogan | d1e9a4f | 2015-05-19 09:50:29 +0100 | [diff] [blame] | 78 | obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | |
Ralf Baechle | 875d43e | 2005-09-03 15:56:16 -0700 | [diff] [blame] | 80 | obj-$(CONFIG_64BIT) += cpu-bugs64.o |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | |
Ralf Baechle | d865bea | 2007-10-11 23:46:10 +0100 | [diff] [blame] | 82 | obj-$(CONFIG_I8253) += i8253.o |
Michael Neuling | e5c6c8e | 2006-03-14 00:11:50 -0500 | [diff] [blame] | 83 | |
Atsushi Nemoto | a9aec7f | 2008-04-05 00:55:41 +0900 | [diff] [blame] | 84 | obj-$(CONFIG_GPIO_TXX9) += gpio_txx9.o |
| 85 | |
Matt Redfearn | 279b991 | 2016-03-31 10:05:36 +0100 | [diff] [blame] | 86 | obj-$(CONFIG_RELOCATABLE) += relocate.o |
| 87 | |
Ralf Baechle | 7aa1c8f | 2012-10-11 18:14:58 +0200 | [diff] [blame] | 88 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o |
| 89 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
Ralf Baechle | 36a8853 | 2007-03-01 11:56:43 +0000 | [diff] [blame] | 90 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
Yoichi Yuasa | 7cd93b8 | 2010-02-08 20:59:39 +0900 | [diff] [blame] | 91 | obj-$(CONFIG_EARLY_PRINTK_8250) += early_printk_8250.o |
David Daney | bba9076 | 2010-02-16 15:26:35 -0800 | [diff] [blame] | 92 | obj-$(CONFIG_SPINLOCK_TEST) += spinlock_test.o |
Gabor Juhos | 487d70d | 2010-11-23 16:06:25 +0100 | [diff] [blame] | 93 | obj-$(CONFIG_MIPS_MACHINE) += mips_machine.o |
Leonid Yegoshin | b0a668f | 2014-12-03 15:47:03 +0000 | [diff] [blame] | 94 | obj-$(CONFIG_MIPSR2_TO_R6_EMULATOR) += mips-r2-to-r6-emul.o |
Nicolas Schichan | 583bb86 | 2006-10-18 15:14:55 +0200 | [diff] [blame] | 95 | |
Jean Delvare | b1e0d8b | 2012-10-02 16:42:36 +0200 | [diff] [blame] | 96 | CFLAGS_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) |
Ralf Baechle | e7c4782 | 2007-07-10 17:33:01 +0100 | [diff] [blame] | 97 | |
| 98 | obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT) += 8250-platform.o |
Ralf Baechle | dde96ca | 2007-07-30 11:48:58 +0100 | [diff] [blame] | 99 | |
David Daney | e5dcb58 | 2011-09-24 02:29:55 +0200 | [diff] [blame] | 100 | obj-$(CONFIG_PERF_EVENTS) += perf_event.o |
| 101 | obj-$(CONFIG_HW_PERF_EVENTS) += perf_event_mipsxx.o |
Deng-Cheng Zhu | 14f7001 | 2010-10-12 19:37:22 +0800 | [diff] [blame] | 102 | |
David Daney | 94bb0c1 | 2010-12-28 13:26:23 -0800 | [diff] [blame] | 103 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
Ralf Baechle | 40e084a | 2015-07-29 22:44:53 +0200 | [diff] [blame] | 104 | obj-$(CONFIG_UPROBES) += uprobes.o |
David Daney | 94bb0c1 | 2010-12-28 13:26:23 -0800 | [diff] [blame] | 105 | |
Paul Burton | 9f98f3d | 2014-01-15 10:31:51 +0000 | [diff] [blame] | 106 | obj-$(CONFIG_MIPS_CM) += mips-cm.o |
Paul Burton | 9c38cf4 | 2014-01-15 10:31:52 +0000 | [diff] [blame] | 107 | obj-$(CONFIG_MIPS_CPC) += mips-cpc.o |
Paul Burton | 9f98f3d | 2014-01-15 10:31:51 +0000 | [diff] [blame] | 108 | |
James Hogan | b1d4c6c | 2014-03-04 10:11:39 +0000 | [diff] [blame] | 109 | obj-$(CONFIG_CPU_PM) += pm.o |
Paul Burton | 3179d37 | 2014-04-14 11:00:56 +0100 | [diff] [blame] | 110 | obj-$(CONFIG_MIPS_CPS_PM) += pm-cps.o |
James Hogan | b1d4c6c | 2014-03-04 10:11:39 +0000 | [diff] [blame] | 111 | |
Steven J. Hill | 32a7ede | 2013-01-03 19:01:52 +0000 | [diff] [blame] | 112 | # |
Florian Fainelli | 63c2b68 | 2013-03-18 15:56:10 +0000 | [diff] [blame] | 113 | # DSP ASE supported for MIPS32 or MIPS64 Release 2 cores only. It is not |
| 114 | # safe to unconditionnaly use the assembler -mdsp / -mdspr2 switches |
| 115 | # here because the compiler may use DSP ASE instructions (such as lwx) in |
| 116 | # code paths where we cannot check that the CPU we are running on supports it. |
| 117 | # Proper abstraction using HAVE_AS_DSP and macros is done in |
| 118 | # arch/mips/include/asm/mipsregs.h. |
Steven J. Hill | 32a7ede | 2013-01-03 19:01:52 +0000 | [diff] [blame] | 119 | # |
| 120 | ifeq ($(CONFIG_CPU_MIPSR2), y) |
| 121 | CFLAGS_DSP = -DHAVE_AS_DSP |
| 122 | |
Steven J. Hill | 32a7ede | 2013-01-03 19:01:52 +0000 | [diff] [blame] | 123 | CFLAGS_signal.o = $(CFLAGS_DSP) |
| 124 | CFLAGS_signal32.o = $(CFLAGS_DSP) |
| 125 | CFLAGS_process.o = $(CFLAGS_DSP) |
| 126 | CFLAGS_branch.o = $(CFLAGS_DSP) |
| 127 | CFLAGS_ptrace.o = $(CFLAGS_DSP) |
| 128 | endif |
| 129 | |
Ralf Baechle | cf72e94 | 2009-12-17 01:57:36 +0000 | [diff] [blame] | 130 | CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS) |