Paul Mackerras | 14cf11a | 2005-09-26 16:04:21 +1000 | [diff] [blame] | 1 | # |
| 2 | # Makefile for the linux kernel. |
| 3 | # |
| 4 | |
Roland McGrath | 80fdf47 | 2007-12-20 03:58:00 -0800 | [diff] [blame] | 5 | CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' |
| 6 | |
Michael Ellerman | ba55bd7 | 2009-06-09 20:48:51 +0000 | [diff] [blame] | 7 | subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror |
| 8 | |
Stephen Rothwell | bd142b7 | 2005-09-30 13:51:25 +1000 | [diff] [blame] | 9 | ifeq ($(CONFIG_PPC64),y) |
Stephen Rothwell | 08a644e | 2007-11-07 16:13:29 +1100 | [diff] [blame] | 10 | CFLAGS_prom_init.o += -mno-minimal-toc |
Stephen Rothwell | bd142b7 | 2005-09-30 13:51:25 +1000 | [diff] [blame] | 11 | endif |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 12 | ifeq ($(CONFIG_PPC32),y) |
Paul Mackerras | 9b6b563 | 2005-10-06 12:06:20 +1000 | [diff] [blame] | 13 | CFLAGS_prom_init.o += -fPIC |
Paul Mackerras | b349126 | 2005-10-06 13:24:50 +1000 | [diff] [blame] | 14 | CFLAGS_btext.o += -fPIC |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 15 | endif |
Paul Mackerras | 9b6b563 | 2005-10-06 12:06:20 +1000 | [diff] [blame] | 16 | |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 17 | ifdef CONFIG_FUNCTION_TRACER |
Steven Rostedt | 4e491d1 | 2008-05-14 23:49:44 -0400 | [diff] [blame] | 18 | # Do not trace early boot code |
Tony Breeds | 7563dc6 | 2008-09-02 16:50:38 +1000 | [diff] [blame] | 19 | CFLAGS_REMOVE_cputable.o = -pg -mno-sched-epilog |
| 20 | CFLAGS_REMOVE_prom_init.o = -pg -mno-sched-epilog |
| 21 | CFLAGS_REMOVE_btext.o = -pg -mno-sched-epilog |
Steven Rostedt | f1eecf0 | 2008-11-26 15:54:46 -0500 | [diff] [blame] | 22 | CFLAGS_REMOVE_prom.o = -pg -mno-sched-epilog |
Steven Rostedt | 6794c78 | 2009-02-09 21:10:27 -0800 | [diff] [blame] | 23 | # do not trace tracer code |
Tony Breeds | 7563dc6 | 2008-09-02 16:50:38 +1000 | [diff] [blame] | 24 | CFLAGS_REMOVE_ftrace.o = -pg -mno-sched-epilog |
Steven Rostedt | 6794c78 | 2009-02-09 21:10:27 -0800 | [diff] [blame] | 25 | # timers used by tracing |
| 26 | CFLAGS_REMOVE_time.o = -pg -mno-sched-epilog |
Steven Rostedt | 4e491d1 | 2008-05-14 23:49:44 -0400 | [diff] [blame] | 27 | endif |
| 28 | |
Matthew Wilcox | 64ac24e | 2008-03-07 21:55:58 -0500 | [diff] [blame] | 29 | obj-y := cputable.o ptrace.o syscalls.o \ |
Paul Mackerras | 624cee3 | 2006-01-12 21:22:34 +1100 | [diff] [blame] | 30 | irq.o align.o signal_32.o pmc.o vdso.o \ |
Benjamin Herrenschmidt | 22e38f2 | 2007-06-04 15:15:49 +1000 | [diff] [blame] | 31 | init_task.o process.o systbl.o idle.o \ |
Michael Ellerman | 698193d | 2010-11-08 17:31:36 +0000 | [diff] [blame] | 32 | signal.o sysfs.o cacheinfo.o time.o \ |
| 33 | prom.o traps.o setup-common.o \ |
| 34 | udbg.o misc.o io.o dma.o \ |
| 35 | misc_$(CONFIG_WORD_SIZE).o vdso32/ |
Roland McGrath | 01e31db | 2008-01-02 17:03:11 -0800 | [diff] [blame] | 36 | obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ |
Paul Mackerras | 8568daa | 2006-02-10 16:02:20 +1100 | [diff] [blame] | 37 | signal_64.o ptrace32.o \ |
Benjamin Herrenschmidt | 2d27cfd | 2009-07-23 23:15:59 +0000 | [diff] [blame] | 38 | paca.o nvram_64.o firmware.o |
K.Prasad | 5aae8a5 | 2010-06-15 11:35:19 +0530 | [diff] [blame] | 39 | obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o |
Benjamin Herrenschmidt | 2d27cfd | 2009-07-23 23:15:59 +0000 | [diff] [blame] | 40 | obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_ppc970.o cpu_setup_pa6t.o |
Benjamin Herrenschmidt | 24cc67d | 2011-01-20 18:50:55 +1100 | [diff] [blame] | 41 | obj-$(CONFIG_PPC_BOOK3S_64) += cpu_setup_power7.o |
Paul Mackerras | 549e815 | 2008-08-30 11:43:47 +1000 | [diff] [blame] | 42 | obj64-$(CONFIG_RELOCATABLE) += reloc_64.o |
Benjamin Herrenschmidt | 34d97e0 | 2010-07-14 14:12:16 +1000 | [diff] [blame] | 43 | obj-$(CONFIG_PPC_BOOK3E_64) += exceptions-64e.o idle_book3e.o |
Benjamin Herrenschmidt | 76b4eda | 2011-04-14 22:32:01 +0000 | [diff] [blame] | 44 | obj-$(CONFIG_PPC_A2) += cpu_setup_a2.o |
Benjamin Herrenschmidt | a7f290d | 2005-11-11 21:15:21 +1100 | [diff] [blame] | 45 | obj-$(CONFIG_PPC64) += vdso64/ |
Benjamin Herrenschmidt | e821ea7 | 2009-06-02 21:17:37 +0000 | [diff] [blame] | 46 | obj-$(CONFIG_ALTIVEC) += vecemu.o |
Paul Mackerras | f39224a | 2006-04-18 21:49:11 +1000 | [diff] [blame] | 47 | obj-$(CONFIG_PPC_970_NAP) += idle_power4.o |
Benjamin Herrenschmidt | 948cf67 | 2011-01-24 18:42:41 +1100 | [diff] [blame] | 48 | obj-$(CONFIG_PPC_P7_NAP) += idle_power7.o |
Grant Likely | 94c0931 | 2010-06-08 07:48:14 -0600 | [diff] [blame] | 49 | obj-$(CONFIG_PPC_OF) += of_platform.o prom_parse.o |
Domen Puncer | 6f66828 | 2007-09-21 00:00:11 +1000 | [diff] [blame] | 50 | obj-$(CONFIG_PPC_CLOCK) += clock.o |
Benjamin Herrenschmidt | 188917e | 2009-09-24 19:29:13 +0000 | [diff] [blame] | 51 | procfs-y := proc_powerpc.o |
David Gibson | d3d2176 | 2005-11-10 15:26:20 +1100 | [diff] [blame] | 52 | obj-$(CONFIG_PROC_FS) += $(procfs-y) |
Stephen Rothwell | bed5927 | 2007-03-04 17:04:44 +1100 | [diff] [blame] | 53 | rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o |
| 54 | obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y) |
Benjamin Herrenschmidt | 3d541c4 | 2009-09-24 19:30:05 +0000 | [diff] [blame] | 55 | obj-$(CONFIG_PPC_RTAS_DAEMON) += rtasd.o |
Paul Mackerras | f4fcbbe | 2005-11-03 14:41:19 +1100 | [diff] [blame] | 56 | obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o |
| 57 | obj-$(CONFIG_RTAS_PROC) += rtas-proc.o |
David Gibson | d3d2176 | 2005-11-10 15:26:20 +1100 | [diff] [blame] | 58 | obj-$(CONFIG_LPARCFG) += lparcfg.o |
Stephen Rothwell | 5804601 | 2005-10-24 14:22:37 +1000 | [diff] [blame] | 59 | obj-$(CONFIG_IBMVIO) += vio.o |
Heiko J Schick | d7a3010 | 2005-11-16 08:56:43 +0100 | [diff] [blame] | 60 | obj-$(CONFIG_IBMEBUS) += ibmebus.o |
Paul Mackerras | 8ad200d | 2005-11-04 13:28:58 +1100 | [diff] [blame] | 61 | obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 62 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
Mahesh Salgaonkar | eb39c88 | 2012-02-16 01:14:22 +0000 | [diff] [blame] | 63 | obj-$(CONFIG_FA_DUMP) += fadump.o |
Kumar Gala | 4490c06 | 2010-10-08 08:32:11 -0500 | [diff] [blame] | 64 | ifeq ($(CONFIG_PPC32),y) |
Kumar Gala | fc4033b | 2008-06-18 16:26:52 -0500 | [diff] [blame] | 65 | obj-$(CONFIG_E500) += idle_e500.o |
Kumar Gala | 4490c06 | 2010-10-08 08:32:11 -0500 | [diff] [blame] | 66 | endif |
Paul Mackerras | 9b78172 | 2006-03-27 19:15:26 +1100 | [diff] [blame] | 67 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o |
| 68 | obj-$(CONFIG_TAU) += tau_6xx.o |
Anton Vorontsov | 90103f9 | 2010-05-17 22:56:52 +0400 | [diff] [blame] | 69 | obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o |
| 70 | ifeq ($(CONFIG_FSL_BOOKE),y) |
| 71 | obj-$(CONFIG_HIBERNATION) += swsusp_booke.o |
| 72 | else |
| 73 | obj-$(CONFIG_HIBERNATION) += swsusp_$(CONFIG_WORD_SIZE).o |
| 74 | endif |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 75 | obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o |
Kumar Gala | f0c426b | 2008-06-21 02:31:01 +1000 | [diff] [blame] | 76 | obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o |
Paul Mackerras | 26f571d | 2007-10-04 11:02:09 +1000 | [diff] [blame] | 77 | obj-$(CONFIG_44x) += cpu_setup_44x.o |
Kumar Gala | 4490c06 | 2010-10-08 08:32:11 -0500 | [diff] [blame] | 78 | obj-$(CONFIG_PPC_FSL_BOOK3E) += cpu_setup_fsl_booke.o dbell.o |
Benjamin Herrenschmidt | 89c8179 | 2010-07-09 15:31:28 +1000 | [diff] [blame] | 79 | obj-$(CONFIG_PPC_BOOK3E_64) += dbell.o |
Michael Ellerman | ac5f89c | 2011-06-29 19:16:59 +0000 | [diff] [blame] | 80 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
Paul Mackerras | 40ef8cb | 2005-10-10 22:50:37 +1000 | [diff] [blame] | 81 | |
Benjamin Herrenschmidt | 2d27cfd | 2009-07-23 23:15:59 +0000 | [diff] [blame] | 82 | extra-y := head_$(CONFIG_WORD_SIZE).o |
Josh Boyer | 15f6527 | 2007-08-20 07:27:07 -0500 | [diff] [blame] | 83 | extra-$(CONFIG_40x) := head_40x.o |
Paul Mackerras | 14cf11a | 2005-09-26 16:04:21 +1000 | [diff] [blame] | 84 | extra-$(CONFIG_44x) := head_44x.o |
| 85 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
| 86 | extra-$(CONFIG_8xx) := head_8xx.o |
Paul Mackerras | 14cf11a | 2005-09-26 16:04:21 +1000 | [diff] [blame] | 87 | extra-y += vmlinux.lds |
| 88 | |
Suzuki Poulose | 9c5f7d3 | 2011-12-14 22:58:12 +0000 | [diff] [blame] | 89 | obj-$(CONFIG_RELOCATABLE_PPC32) += reloc_32.o |
| 90 | |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 91 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o |
Becky Bruce | 4fc665b | 2008-09-12 10:34:46 +0000 | [diff] [blame] | 92 | obj-$(CONFIG_PPC64) += dma-iommu.o iommu.o |
Jason Wessel | 17ce452 | 2008-07-23 11:30:15 -0500 | [diff] [blame] | 93 | obj-$(CONFIG_KGDB) += kgdb.o |
Benjamin Herrenschmidt | 28794d3 | 2009-03-10 17:53:27 +0000 | [diff] [blame] | 94 | obj-$(CONFIG_PPC_OF_BOOT_TRAMPOLINE) += prom_init.o |
Paul Mackerras | 20c8c21 | 2005-09-28 20:28:14 +1000 | [diff] [blame] | 95 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
Paul Mackerras | 9b6b563 | 2005-10-06 12:06:20 +1000 | [diff] [blame] | 96 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
Paul Mackerras | 5ad5707 | 2005-11-05 10:33:55 +1100 | [diff] [blame] | 97 | obj-$(CONFIG_SMP) += smp.o |
Paul Mackerras | 7568cb4 | 2005-11-14 17:30:17 +1100 | [diff] [blame] | 98 | obj-$(CONFIG_KPROBES) += kprobes.o |
Paul Mackerras | 13b8a27 | 2006-01-10 16:19:05 +1100 | [diff] [blame] | 99 | obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o |
Christoph Hellwig | fd3e0bb | 2008-04-17 14:35:00 +1000 | [diff] [blame] | 100 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
Becky Bruce | ec3cf2e | 2009-05-14 12:42:28 +0000 | [diff] [blame] | 101 | obj-$(CONFIG_SWIOTLB) += dma-swiotlb.o |
Benjamin Herrenschmidt | 4c75a6f | 2006-11-11 17:24:53 +1100 | [diff] [blame] | 102 | |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 103 | pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o |
| 104 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ |
Grant Likely | fbe6544 | 2009-08-25 20:07:11 +0000 | [diff] [blame] | 105 | pci-common.o pci_of_scan.o |
Michael Ellerman | df87ef5 | 2007-05-08 12:58:34 +1000 | [diff] [blame] | 106 | obj-$(CONFIG_PCI_MSI) += msi.o |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 107 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ |
| 108 | machine_kexec_$(CONFIG_WORD_SIZE).o |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 109 | obj-$(CONFIG_AUDIT) += audit.o |
| 110 | obj64-$(CONFIG_AUDIT) += compat_audit.o |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 111 | |
Michael Ellerman | 3cc30d0 | 2011-04-11 21:25:01 +0000 | [diff] [blame] | 112 | obj-$(CONFIG_PPC_IO_WORKAROUNDS) += io-workarounds.o |
| 113 | |
Steven Rostedt | 4e491d1 | 2008-05-14 23:49:44 -0400 | [diff] [blame] | 114 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
Steven Rostedt | 6794c78 | 2009-02-09 21:10:27 -0800 | [diff] [blame] | 115 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
Ian Munsie | 02424d8 | 2011-02-02 17:27:24 +0000 | [diff] [blame] | 116 | obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o |
Scott Wood | 9d6df3f | 2010-02-25 18:04:33 -0600 | [diff] [blame] | 117 | obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o |
Scott Wood | a111065 | 2010-02-25 18:09:45 -0600 | [diff] [blame] | 118 | |
Scott Wood | 9d6df3f | 2010-02-25 18:04:33 -0600 | [diff] [blame] | 119 | obj-$(CONFIG_PPC_PERF_CTRS) += perf_event.o |
Paul Mackerras | 105988c | 2009-06-17 21:50:04 +1000 | [diff] [blame] | 120 | obj64-$(CONFIG_PPC_PERF_CTRS) += power4-pmu.o ppc970-pmu.o power5-pmu.o \ |
| 121 | power5+-pmu.o power6-pmu.o power7-pmu.o |
Paul Mackerras | 7325927 | 2009-06-17 21:53:51 +1000 | [diff] [blame] | 122 | obj32-$(CONFIG_PPC_PERF_CTRS) += mpc7450-pmu.o |
Steven Rostedt | 4e491d1 | 2008-05-14 23:49:44 -0400 | [diff] [blame] | 123 | |
Scott Wood | a111065 | 2010-02-25 18:09:45 -0600 | [diff] [blame] | 124 | obj-$(CONFIG_FSL_EMB_PERF_EVENT) += perf_event_fsl_emb.o |
| 125 | obj-$(CONFIG_FSL_EMB_PERF_EVENT_E500) += e500-pmu.o |
| 126 | |
Scott Wood | 5dd57a1 | 2007-09-18 15:29:35 -0500 | [diff] [blame] | 127 | obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o |
| 128 | |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 129 | ifneq ($(CONFIG_PPC_INDIRECT_IO),y) |
Benjamin Herrenschmidt | 68a6435 | 2006-11-13 09:27:39 +1100 | [diff] [blame] | 130 | obj-y += iomap.o |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 131 | endif |
| 132 | |
Paul Mackerras | 437a58d | 2005-11-18 15:43:34 +1100 | [diff] [blame] | 133 | obj-$(CONFIG_PPC64) += $(obj64-y) |
Paul Mackerras | 7325927 | 2009-06-17 21:53:51 +1000 | [diff] [blame] | 134 | obj-$(CONFIG_PPC32) += $(obj32-y) |
Paul Mackerras | 437a58d | 2005-11-18 15:43:34 +1100 | [diff] [blame] | 135 | |
Anton Vorontsov | 7375331 | 2008-12-17 10:09:01 +0000 | [diff] [blame] | 136 | ifneq ($(CONFIG_XMON)$(CONFIG_KEXEC),) |
Anton Vorontsov | 322b439 | 2008-12-17 10:08:55 +0000 | [diff] [blame] | 137 | obj-y += ppc_save_regs.o |
| 138 | endif |
| 139 | |
Alexander Graf | d17051c | 2010-07-29 14:47:57 +0200 | [diff] [blame] | 140 | obj-$(CONFIG_KVM_GUEST) += kvm.o kvm_emul.o |
Alexander Graf | 2a342ed | 2010-07-29 14:47:48 +0200 | [diff] [blame] | 141 | |
Michael Ellerman | a15098c | 2009-08-09 19:02:51 +0000 | [diff] [blame] | 142 | # Disable GCOV in odd or sensitive code |
| 143 | GCOV_PROFILE_prom_init.o := n |
| 144 | GCOV_PROFILE_ftrace.o := n |
| 145 | GCOV_PROFILE_machine_kexec_64.o := n |
| 146 | GCOV_PROFILE_machine_kexec_32.o := n |
| 147 | GCOV_PROFILE_kprobes.o := n |
| 148 | |
David Gibson | 25c8a78 | 2005-10-27 16:27:25 +1000 | [diff] [blame] | 149 | extra-$(CONFIG_PPC_FPU) += fpu.o |
Benjamin Herrenschmidt | e821ea7 | 2009-06-02 21:17:37 +0000 | [diff] [blame] | 150 | extra-$(CONFIG_ALTIVEC) += vector.o |
Stephen Rothwell | 640768e | 2005-10-28 12:51:45 +1000 | [diff] [blame] | 151 | extra-$(CONFIG_PPC64) += entry_64.o |
Stephen Rothwell | 0a4690c | 2008-01-07 16:12:44 +1100 | [diff] [blame] | 152 | |
| 153 | extra-y += systbl_chk.i |
| 154 | $(obj)/systbl.o: systbl_chk |
| 155 | |
| 156 | quiet_cmd_systbl_chk = CALL $< |
| 157 | cmd_systbl_chk = $(CONFIG_SHELL) $< $(obj)/systbl_chk.i |
| 158 | |
| 159 | PHONY += systbl_chk |
| 160 | systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i |
| 161 | $(call cmd,systbl_chk) |
Kumar Gala | e4ccde0 | 2008-02-12 02:32:00 +1100 | [diff] [blame] | 162 | |
Michael Ellerman | 7719ed7 | 2009-06-11 02:12:28 +0000 | [diff] [blame] | 163 | ifeq ($(CONFIG_PPC_OF_BOOT_TRAMPOLINE),y) |
Michael Ellerman | 5c02cd2 | 2008-04-24 12:08:22 +1000 | [diff] [blame] | 164 | $(obj)/built-in.o: prom_init_check |
| 165 | |
| 166 | quiet_cmd_prom_init_check = CALL $< |
| 167 | cmd_prom_init_check = $(CONFIG_SHELL) $< "$(NM)" "$(obj)/prom_init.o" |
| 168 | |
| 169 | PHONY += prom_init_check |
| 170 | prom_init_check: $(src)/prom_init_check.sh $(obj)/prom_init.o |
| 171 | $(call cmd,prom_init_check) |
Michael Ellerman | 7719ed7 | 2009-06-11 02:12:28 +0000 | [diff] [blame] | 172 | endif |
Michael Ellerman | 5c02cd2 | 2008-04-24 12:08:22 +1000 | [diff] [blame] | 173 | |
Kumar Gala | e4ccde0 | 2008-02-12 02:32:00 +1100 | [diff] [blame] | 174 | clean-files := vmlinux.lds |