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 | |
Stephen Rothwell | bd142b7 | 2005-09-30 13:51:25 +1000 | [diff] [blame] | 7 | ifeq ($(CONFIG_PPC64),y) |
Stephen Rothwell | 08a644e | 2007-11-07 16:13:29 +1100 | [diff] [blame] | 8 | CFLAGS_prom_init.o += -mno-minimal-toc |
Stephen Rothwell | bd142b7 | 2005-09-30 13:51:25 +1000 | [diff] [blame] | 9 | endif |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 10 | ifeq ($(CONFIG_PPC32),y) |
Paul Mackerras | 9b6b563 | 2005-10-06 12:06:20 +1000 | [diff] [blame] | 11 | CFLAGS_prom_init.o += -fPIC |
Paul Mackerras | b349126 | 2005-10-06 13:24:50 +1000 | [diff] [blame] | 12 | CFLAGS_btext.o += -fPIC |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 13 | endif |
Paul Mackerras | 9b6b563 | 2005-10-06 12:06:20 +1000 | [diff] [blame] | 14 | |
Steven Rostedt | 4e491d1 | 2008-05-14 23:49:44 -0400 | [diff] [blame] | 15 | ifdef CONFIG_FTRACE |
| 16 | # Do not trace early boot code |
| 17 | CFLAGS_REMOVE_cputable.o = -pg |
| 18 | CFLAGS_REMOVE_prom_init.o = -pg |
| 19 | |
| 20 | ifdef CONFIG_DYNAMIC_FTRACE |
| 21 | # dynamic ftrace setup. |
| 22 | CFLAGS_REMOVE_ftrace.o = -pg |
| 23 | endif |
| 24 | |
| 25 | endif |
| 26 | |
Matthew Wilcox | 64ac24e | 2008-03-07 21:55:58 -0500 | [diff] [blame] | 27 | obj-y := cputable.o ptrace.o syscalls.o \ |
Paul Mackerras | 624cee3 | 2006-01-12 21:22:34 +1100 | [diff] [blame] | 28 | irq.o align.o signal_32.o pmc.o vdso.o \ |
Benjamin Herrenschmidt | 22e38f2 | 2007-06-04 15:15:49 +1000 | [diff] [blame] | 29 | init_task.o process.o systbl.o idle.o \ |
Benjamin Herrenschmidt | b950bdd | 2008-08-18 14:23:51 +1000 | [diff] [blame^] | 30 | signal.o sysfs.o |
Benjamin Herrenschmidt | a7f290d | 2005-11-11 21:15:21 +1100 | [diff] [blame] | 31 | obj-y += vdso32/ |
Roland McGrath | 01e31db | 2008-01-02 17:03:11 -0800 | [diff] [blame] | 32 | obj-$(CONFIG_PPC64) += setup_64.o sys_ppc32.o \ |
Paul Mackerras | 8568daa | 2006-02-10 16:02:20 +1100 | [diff] [blame] | 33 | signal_64.o ptrace32.o \ |
Olof Johansson | 2e97425 | 2006-08-11 00:03:01 -0500 | [diff] [blame] | 34 | paca.o cpu_setup_ppc970.o \ |
Olof Johansson | 1199919 | 2007-02-04 16:36:51 -0600 | [diff] [blame] | 35 | cpu_setup_pa6t.o \ |
Benjamin Herrenschmidt | b950bdd | 2008-08-18 14:23:51 +1000 | [diff] [blame^] | 36 | firmware.o nvram_64.o |
Benjamin Herrenschmidt | a7f290d | 2005-11-11 21:15:21 +1100 | [diff] [blame] | 37 | obj-$(CONFIG_PPC64) += vdso64/ |
Paul Mackerras | 40ef8cb | 2005-10-10 22:50:37 +1000 | [diff] [blame] | 38 | obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o |
Paul Mackerras | f39224a | 2006-04-18 21:49:11 +1000 | [diff] [blame] | 39 | obj-$(CONFIG_PPC_970_NAP) += idle_power4.o |
Benjamin Herrenschmidt | 7eebde7 | 2006-11-11 17:24:59 +1100 | [diff] [blame] | 40 | obj-$(CONFIG_PPC_OF) += of_device.o of_platform.o prom_parse.o |
Domen Puncer | 6f66828 | 2007-09-21 00:00:11 +1000 | [diff] [blame] | 41 | obj-$(CONFIG_PPC_CLOCK) += clock.o |
David Gibson | d3d2176 | 2005-11-10 15:26:20 +1100 | [diff] [blame] | 42 | procfs-$(CONFIG_PPC64) := proc_ppc64.o |
| 43 | obj-$(CONFIG_PROC_FS) += $(procfs-y) |
Stephen Rothwell | bed5927 | 2007-03-04 17:04:44 +1100 | [diff] [blame] | 44 | rtaspci-$(CONFIG_PPC64)-$(CONFIG_PCI) := rtas_pci.o |
| 45 | obj-$(CONFIG_PPC_RTAS) += rtas.o rtas-rtc.o $(rtaspci-y-y) |
Paul Mackerras | f4fcbbe | 2005-11-03 14:41:19 +1100 | [diff] [blame] | 46 | obj-$(CONFIG_RTAS_FLASH) += rtas_flash.o |
| 47 | obj-$(CONFIG_RTAS_PROC) += rtas-proc.o |
David Gibson | d3d2176 | 2005-11-10 15:26:20 +1100 | [diff] [blame] | 48 | obj-$(CONFIG_LPARCFG) += lparcfg.o |
Stephen Rothwell | 5804601 | 2005-10-24 14:22:37 +1000 | [diff] [blame] | 49 | obj-$(CONFIG_IBMVIO) += vio.o |
Heiko J Schick | d7a3010 | 2005-11-16 08:56:43 +0100 | [diff] [blame] | 50 | obj-$(CONFIG_IBMEBUS) += ibmebus.o |
Paul Mackerras | 8ad200d | 2005-11-04 13:28:58 +1100 | [diff] [blame] | 51 | obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o |
Michael Ellerman | 0cc4746 | 2005-12-04 18:39:37 +1100 | [diff] [blame] | 52 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
Kumar Gala | fc4033b | 2008-06-18 16:26:52 -0500 | [diff] [blame] | 53 | obj-$(CONFIG_E500) += idle_e500.o |
Paul Mackerras | 9b78172 | 2006-03-27 19:15:26 +1100 | [diff] [blame] | 54 | obj-$(CONFIG_6xx) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o |
| 55 | obj-$(CONFIG_TAU) += tau_6xx.o |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 56 | obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o \ |
| 57 | swsusp_$(CONFIG_WORD_SIZE).o |
| 58 | obj64-$(CONFIG_HIBERNATION) += swsusp_asm64.o |
Kumar Gala | f0c426b | 2008-06-21 02:31:01 +1000 | [diff] [blame] | 59 | obj-$(CONFIG_MODULES) += module.o module_$(CONFIG_WORD_SIZE).o |
Paul Mackerras | 26f571d | 2007-10-04 11:02:09 +1000 | [diff] [blame] | 60 | obj-$(CONFIG_44x) += cpu_setup_44x.o |
Paul Mackerras | 40ef8cb | 2005-10-10 22:50:37 +1000 | [diff] [blame] | 61 | |
Paul Mackerras | 70d64ce | 2005-10-10 21:52:43 +1000 | [diff] [blame] | 62 | extra-$(CONFIG_PPC_STD_MMU) := head_32.o |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 63 | extra-$(CONFIG_PPC64) := head_64.o |
Josh Boyer | 15f6527 | 2007-08-20 07:27:07 -0500 | [diff] [blame] | 64 | extra-$(CONFIG_40x) := head_40x.o |
Paul Mackerras | 14cf11a | 2005-09-26 16:04:21 +1000 | [diff] [blame] | 65 | extra-$(CONFIG_44x) := head_44x.o |
| 66 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
| 67 | extra-$(CONFIG_8xx) := head_8xx.o |
Paul Mackerras | 14cf11a | 2005-09-26 16:04:21 +1000 | [diff] [blame] | 68 | extra-y += vmlinux.lds |
| 69 | |
Stephen Rothwell | 127efeb | 2006-06-28 11:55:49 +1000 | [diff] [blame] | 70 | obj-y += time.o prom.o traps.o setup-common.o \ |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 71 | udbg.o misc.o io.o \ |
| 72 | misc_$(CONFIG_WORD_SIZE).o |
| 73 | obj-$(CONFIG_PPC32) += entry_32.o setup_32.o |
| 74 | obj-$(CONFIG_PPC64) += dma_64.o iommu.o |
Jason Wessel | 17ce452 | 2008-07-23 11:30:15 -0500 | [diff] [blame] | 75 | obj-$(CONFIG_KGDB) += kgdb.o |
Paul Mackerras | be42d5f | 2006-01-09 21:32:42 +1100 | [diff] [blame] | 76 | obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o |
Paul Mackerras | 20c8c21 | 2005-09-28 20:28:14 +1000 | [diff] [blame] | 77 | obj-$(CONFIG_MODULES) += ppc_ksyms.o |
Paul Mackerras | 9b6b563 | 2005-10-06 12:06:20 +1000 | [diff] [blame] | 78 | obj-$(CONFIG_BOOTX_TEXT) += btext.o |
Paul Mackerras | 5ad5707 | 2005-11-05 10:33:55 +1100 | [diff] [blame] | 79 | obj-$(CONFIG_SMP) += smp.o |
Paul Mackerras | 7568cb4 | 2005-11-14 17:30:17 +1100 | [diff] [blame] | 80 | obj-$(CONFIG_KPROBES) += kprobes.o |
Paul Mackerras | 13b8a27 | 2006-01-10 16:19:05 +1100 | [diff] [blame] | 81 | obj-$(CONFIG_PPC_UDBG_16550) += legacy_serial.o udbg_16550.o |
Christoph Hellwig | fd3e0bb | 2008-04-17 14:35:00 +1000 | [diff] [blame] | 82 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
Benjamin Herrenschmidt | 4c75a6f | 2006-11-11 17:24:53 +1100 | [diff] [blame] | 83 | |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 84 | pci64-$(CONFIG_PPC64) += pci_dn.o isa-bridge.o |
| 85 | obj-$(CONFIG_PCI) += pci_$(CONFIG_WORD_SIZE).o $(pci64-y) \ |
| 86 | pci-common.o |
Michael Ellerman | df87ef5 | 2007-05-08 12:58:34 +1000 | [diff] [blame] | 87 | obj-$(CONFIG_PCI_MSI) += msi.o |
Stephen Rothwell | 2578bfa | 2007-09-21 10:16:20 +1000 | [diff] [blame] | 88 | obj-$(CONFIG_KEXEC) += machine_kexec.o crash.o \ |
| 89 | machine_kexec_$(CONFIG_WORD_SIZE).o |
Al Viro | c080379 | 2006-08-31 19:02:42 -0400 | [diff] [blame] | 90 | obj-$(CONFIG_AUDIT) += audit.o |
| 91 | obj64-$(CONFIG_AUDIT) += compat_audit.o |
Stephen Rothwell | cabb558 | 2005-09-30 16:16:52 +1000 | [diff] [blame] | 92 | |
Steven Rostedt | 4e491d1 | 2008-05-14 23:49:44 -0400 | [diff] [blame] | 93 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
| 94 | |
Scott Wood | 5dd57a1 | 2007-09-18 15:29:35 -0500 | [diff] [blame] | 95 | obj-$(CONFIG_8XX_MINIMAL_FPEMU) += softemu8xx.o |
| 96 | |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 97 | ifneq ($(CONFIG_PPC_INDIRECT_IO),y) |
Benjamin Herrenschmidt | 68a6435 | 2006-11-13 09:27:39 +1100 | [diff] [blame] | 98 | obj-y += iomap.o |
Benjamin Herrenschmidt | 4cb3cee | 2006-11-11 17:25:10 +1100 | [diff] [blame] | 99 | endif |
| 100 | |
Paul Mackerras | 437a58d | 2005-11-18 15:43:34 +1100 | [diff] [blame] | 101 | obj-$(CONFIG_PPC64) += $(obj64-y) |
| 102 | |
David Gibson | 25c8a78 | 2005-10-27 16:27:25 +1000 | [diff] [blame] | 103 | extra-$(CONFIG_PPC_FPU) += fpu.o |
Stephen Rothwell | 640768e | 2005-10-28 12:51:45 +1000 | [diff] [blame] | 104 | extra-$(CONFIG_PPC64) += entry_64.o |
Stephen Rothwell | 0a4690c | 2008-01-07 16:12:44 +1100 | [diff] [blame] | 105 | |
| 106 | extra-y += systbl_chk.i |
| 107 | $(obj)/systbl.o: systbl_chk |
| 108 | |
| 109 | quiet_cmd_systbl_chk = CALL $< |
| 110 | cmd_systbl_chk = $(CONFIG_SHELL) $< $(obj)/systbl_chk.i |
| 111 | |
| 112 | PHONY += systbl_chk |
| 113 | systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i |
| 114 | $(call cmd,systbl_chk) |
Kumar Gala | e4ccde0 | 2008-02-12 02:32:00 +1100 | [diff] [blame] | 115 | |
Michael Ellerman | 5c02cd2 | 2008-04-24 12:08:22 +1000 | [diff] [blame] | 116 | $(obj)/built-in.o: prom_init_check |
| 117 | |
| 118 | quiet_cmd_prom_init_check = CALL $< |
| 119 | cmd_prom_init_check = $(CONFIG_SHELL) $< "$(NM)" "$(obj)/prom_init.o" |
| 120 | |
| 121 | PHONY += prom_init_check |
| 122 | prom_init_check: $(src)/prom_init_check.sh $(obj)/prom_init.o |
| 123 | $(call cmd,prom_init_check) |
| 124 | |
Kumar Gala | e4ccde0 | 2008-02-12 02:32:00 +1100 | [diff] [blame] | 125 | clean-files := vmlinux.lds |